hi all...
I'm having a problem where i send an email using swift mailer, it does not show any error. I used Post cast server on my development PC to monitor the email....Is there any configuration in php.ini setting that I need to set?
[SOLVED] php.ini setting for swift mailer
Moderators: Chris Corbyn, General Moderators
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Code: Select all
require_once "lib/Swift.php";
require_once "lib/Swift/Connection/NativeMail.php";
$swift =& new Swift(new Swift_Connection_NativeMail());
$recipients =& new Swift_RecipientList();
$message =& new Swift_Message('Welcome to....');
$msg2 = "Dear ".$name.", <br>
Congratulations on your recent appointment and welcome to
dareda.com. You have now been added to dareda's online HR solution.
Click on the following link to confirm and activate
you as a user of dareda. <br><br>
<a href=\"".$url."\">".$url."</a>
<br><br>Sincerely<br>dareda";
$msg = "Dear ".$name.", \n
Congratulations on your recent appointment and welcome to
dareda.com. You have now been added to dareda's online HR solution.
Click on the following link to confirm and activate
you as a user of dareda. \n\n
<a href=\"".$url."\">".$url."</a>
\n\nSincerely\ndareda";
$recipients->addTo($email, $name);
$message->attach(new Swift_Message_Part($msg2));
$message->attach(new Swift_Message_Part($msg, "text/html"));
$swift->batchSend($message, $recipients, new Swift_Address("vmteam@dareda.com", "dareda.com"));- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
this is the problem i will get when testing using swift mailer...does anyone know how to solve thisWarning: mail() [function.mail]: SMTP server response: 550 5.7.1 <kelamkabut@example.com>... we do not relay <webmaster@virtualmalaysia.com> in E:\Portal\jobvm\jobseeker\mailTest.php on line 48
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
You've got the wrong SMTP setting in php.ini. That's a relaying denied message. You'll have to find out the correct SMTP server to send outgoing email.cade wrote:this is the problem i will get when testing using swift mailer...does anyone know how to solve thisWarning: mail() [function.mail]: SMTP server response: 550 5.7.1 <kelamkabut@example.com>... we do not relay <webmaster@virtualmalaysia.com> in E:\Portal\jobvm\jobseeker\mailTest.php on line 48