Xhi
21 Aug 2009, 03:09 AM
Hi all!
I'm new to this site (and I'm learning Javascript, and also hoping to learn PHP also!)
My site is a social network, which has alerts set up e.g. a user gets alerts in their yahoo etc mailbox when they perform certain activities on the site e.g. register, get a message, receive a comment to their videos/ photos etc!
This worked OK when initially scripted by our web developers, but it suddenly stopped working, and people no longer receive alerts (including their activation emails). I suspect my hosting company changed the settings on their server and this is why this happened.
When I queried them, their response was:
"You have to use localhost or 127.0.0.1 to connect to the smtp server to send emails, not mail.domainname.com for the address, plus you also have to use smtp authentication for it."
I've had a peek at the code, and this is wat I see is:
<?
require_once "../maillib/Swift.php";
require_once "../maillib/Swift/Connection/SMTP.php";
$smtp =& new Swift_Connection_SMTP("localhost", 26);
// $smtp =& new Swift_Connection_SMTP("mail.domainname.com", 26);
$smtp->setUsername("cron@domainname.com");
$smtp->setpassword("cron");
?>
!
So it seems to be OK, so why don't my users get their alerts? Thanks!
I'm new to this site (and I'm learning Javascript, and also hoping to learn PHP also!)
My site is a social network, which has alerts set up e.g. a user gets alerts in their yahoo etc mailbox when they perform certain activities on the site e.g. register, get a message, receive a comment to their videos/ photos etc!
This worked OK when initially scripted by our web developers, but it suddenly stopped working, and people no longer receive alerts (including their activation emails). I suspect my hosting company changed the settings on their server and this is why this happened.
When I queried them, their response was:
"You have to use localhost or 127.0.0.1 to connect to the smtp server to send emails, not mail.domainname.com for the address, plus you also have to use smtp authentication for it."
I've had a peek at the code, and this is wat I see is:
<?
require_once "../maillib/Swift.php";
require_once "../maillib/Swift/Connection/SMTP.php";
$smtp =& new Swift_Connection_SMTP("localhost", 26);
// $smtp =& new Swift_Connection_SMTP("mail.domainname.com", 26);
$smtp->setUsername("cron@domainname.com");
$smtp->setpassword("cron");
?>
!
So it seems to be OK, so why don't my users get their alerts? Thanks!