-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontactForm_events.php
69 lines (58 loc) · 2.21 KB
/
contactForm_events.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
//BindEvents Method @1-FBD7E53D
function BindEvents()
{
global $saconsult;
$saconsult->CCSEvents["AfterInsert"] = "saconsult_AfterInsert";
}
//End BindEvents Method
//saconsult_AfterInsert @6-8A56B6F9
function saconsult_AfterInsert(& $sender)
{
$saconsult_AfterInsert = true;
$Component = & $sender;
$Container = & CCGetParentContainer($sender);
global $saconsult; //Compatibility
//End saconsult_AfterInsert
//Custom Code @20-2A29BDB7
// -------------------------
// Write your own code here.
// -------------------------
ini_set("SMTP", "localhost");
// email code
//$from_email = "lalitnayyar@gmail.com";
// Sender details
$to = $saconsult->sacon_email->GetText();
$cc = "sonianayyar02@gmail.com";
$bcc = "lalitnayyar@gmail.com";
$from = "sonianayyar02@gmail.com";
// email body
$subject = "Request received on http://www.samridhiastrology.com";
$message = "Hello " . $saconsult->sacon_Name->GetText().", \r\n\n";
$message .= "\r\n";
$message .= "Query : ".$saconsult->sacon_question->GetText()."\r\n\n";
$message .= "Date Of Birth ".$saconsult->sacon_DOB->GetText()."\r\n\n";
$message .= "Time Of Birth ".$saconsult->sacon_TOB->GetText()."\r\n\n";
$message .= "Place Of Birth ".$saconsult->sacon_POB->GetText()."\r\n\n";
$message .= "\r\n";
$message .= "We will revert back to you in next 4 hours. \r\n";
$message .= "\r\n";
$message .= "Thanks \r\n";
$message .= "Sonia Nayyar \r\n";
$message .= "Celebrity Astrologer \r\n";
$message .= "http://www.samridhiastrology.com \r\n";
$charset = "Windows-1252";
$transferEncoding = "";
$additional_headers = "From: $from\nReply-To: $from\nContent-Type: text/plain; charset=$charset\nContent-Transfer-Encoding: $transferEncoding";
$additional_headers .= "BCC:".$bcc."\r\n";
$additional_headers .= "CC:".$cc."\r\n";
mail ($to,$subject, $message, $additional_headers);
//mail($to_email,$subject,$message,$headers);
// end email code
ini_restore("SMTP");
//End Custom Code
//Close saconsult_AfterInsert @6-B370721C
return $saconsult_AfterInsert;
}
//End Close saconsult_AfterInsert
?>