Page 1 of 1
[SOLVED] php.ini setting for swift mailer
Posted: Tue Jul 03, 2007 9:02 pm
by cade
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?
Posted: Tue Jul 03, 2007 9:29 pm
by superdezign
You are "having a problem?" What is the problem?
Posted: Tue Jul 03, 2007 9:32 pm
by cade
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"));
this is the sample code of my php and swift mailer
Posted: Tue Jul 03, 2007 9:41 pm
by superdezign
And, again, what is the problem?
Posted: Tue Jul 03, 2007 9:46 pm
by feyd
Swift_Connection_NativeMail uses the same settings
mail() does. The manual page on
mail() references the directives.
Posted: Tue Jul 03, 2007 10:53 pm
by cade
the problem is why don't recipient does not receive the email...
Posted: Wed Jul 04, 2007 2:25 am
by cade
this is the problem i will get when testing using swift mailer...does anyone know how to solve this
Posted: Wed Jul 04, 2007 2:34 am
by Chris Corbyn
cade wrote:
this is the problem i will get when testing using swift mailer...does anyone know how to solve this
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.