Zend_Mail weird error or unknown???
Posted: Wed Mar 31, 2010 1:37 pm
I have the following code:
If I provide the full email as my user name 'alex@domain.com' I get the following exception:
When I use just 'alex' without TLD and domain I get an exception 'unknown'
Any ideas on what I am doing wrong???
I have used Swift many times in the past and usually provide a host, username (full email) and password, in this case passwords do not seem to exist in the SMTP transport API???
Cheers,
Alex
Code: Select all
Zend_Mail::setDefaultTransport(new Zend_Mail_Transport_Smtp('smtp2.ourISP.com', array('name' => 'alex@domain.com', 'port' => 25)));
$mailer = new Zend_Mail();
$mailer->addTo($to[0], $to[1]);
$mailer->setFrom($from[0], $from[1]);
$mailer->setSubject($subject);
$mailer->setBodyHtml($message);
$mailer->send();Our ISP has a different domain than does the domain on which I am trying to send. These details appear to work for Ouytlook when sending my my computer and the PHP code is also running locally so those credcentials should work.'alex@domain.com' appears to be a DNS hostname but cannot match against hostname schema for TLD 'com', 'alex@domain.com' does not appear to be a valid local network name
When I use just 'alex' without TLD and domain I get an exception 'unknown'
Any ideas on what I am doing wrong???
I have used Swift many times in the past and usually provide a host, username (full email) and password, in this case passwords do not seem to exist in the SMTP transport API???
Cheers,
Alex