I am using below code and i got emails but from email address not coming from setFrom() function. Can anyone help me to set desire from email address in SMTP sendmail() function. Thanks in advance.
include_once 'Mailer.php';
$body = 'TEST, Testing of email.';
$subject = 'Email Demo';
$email = 'test1@gmail.com';
$fromEmail = 'test2@gmail.com';
$objMail = new Mailer();
$objMail->mail->AddReplyTo('test3@gmail.com', 'Test 3');
$objMail->mail->SetFrom('testfrom1@gmail.com', 'Test From 1');
$objMail->mail->AddAddress('test4@gmail.com', 'Test 4');
$objMail->mail->IsHTML(true);
$objMail->sendmail($email, 'Test', $subject, $body);
0 comments:
Post a Comment