mikesmith hit the nail on the head. $conn should be $smtp, or $smtp should be $conn.... $smtp just appears from nowhere in your code. Oh yah, and only create one Swift instance.
now, I am trying to use an external SMTP as well, with this following code:
$smtp =& new Swift_Connection_SMTP("smtpout.secureserver.net", 80);
$smtp->setUsername("USER_HIDDEN");
$smtp->setpassword("PASSWORD_HIDDEN");
$swift =& new Swift($smtp);
I am fairly new to php and such, where exactly do I copy this code into so that my siftmailer can use this SMTP? And with the particular file in mind, where in the file do I place it? Thanks!
jcbodyworks wrote:now, I am trying to use an external SMTP as well, with this following code:
$smtp =& new Swift_Connection_SMTP("smtpout.secureserver.net", 80);
$smtp->setUsername("USER_HIDDEN");
$smtp->setpassword("PASSWORD_HIDDEN");
$swift =& new Swift($smtp);
I am fairly new to php and such, where exactly do I copy this code into so that my siftmailer can use this SMTP? And with the particular file in mind, where in the file do I place it? Thanks!
-Chris
I highly doubt you should be using port 80 to connect to a SMTP server Port 80 is the HTTP port. Ports 25, 465 and 587 are SMTP ports -- usually just 25.