Skip to content

Commit 084256a

Browse files
authored
Create process_mail.php
0 parents  commit 084256a

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

process_mail.php

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
ini_set("include_path", 'your php folder path:' . ini_get("include_path") );
3+
require_once "Mail.php";
4+
5+
$message="Your Message.....";
6+
$from = "your name <mail@yourwebmal.com>";
7+
$to = name." <".abc@abc.com.">";
8+
$subject = "SMTP Mail Test";
9+
10+
$username = "mail@yourwebmail.com";
11+
$password = "yourwebmail password";
12+
$host = "localhost";
13+
14+
$headers = array ('From' => $from,'To' => $to,'Subject' => $subject);
15+
16+
$smtp = Mail::factory('smtp',array ('host' => $host,'auth' => true,'socket_options' => array('ssl' => array('verify_peer_name' => false, 'allow_self_signed' => true)),'username' => $username,'password' => $password,'port' => '25'));
17+
18+
$mail = $smtp->send($to, $headers, $message);
19+
20+
if (PEAR::isError($mail))
21+
{
22+
echo "<p>Error Inside: " . $mail->getMessage() . "</p>";
23+
}
24+
else
25+
{
26+
echo "<p>Message successfully sent!</p>";
27+
}
28+
?>

0 commit comments

Comments
 (0)