kreut Posted February 9, 2011 Share Posted February 9, 2011 Hello, I'm trying to use Zend Mail within one of my websites. I'd like to of course do my development on my local server (I have a MAC) before uploading to hosting company. I have a mail connect script which looks like this: <?php $mailhost = 'smtp.live.com'; $mailconfig = array('auth' => 'login', 'username' => 'kreut@hotmail.com', 'password' => '1123414', 'ssl' => 'ssl', 'port' => '25'); $transport = new Zend_Mail_Transport_Smtp($mailhost, $mailconfig); Zend_Mail::setDefaultTransport($transport); and my processing of the e-mail looks like this: require_once('mail_connector.php'); $mail = new Zend_Mail('UTF-8'); $mail->addTo('eric.kean@wwu.edu','Eric Kean'); $mail->setFrom('kreut@hotmail.com', 'Test'); $mail->setSubject('Comments from feedback form'); $mail->setReplyTo($_POST['email'], $_POST['name']); $text = "Name: {$_POST['name']}\r\n\r\n"; $text .= "Email: {$_POST['email']}\r\n\r\n"; $text .= "Comments: {$_POST['comments']}"; $mail->setBodyText($text, 'UTF-8'); $success = $mail->send(); . When I run the script, I get the error "Could not open socket.". :'( However, if I just try to send an email from my Mac Mail application, it sends off fine. Any help would be appreciated... Thank you... Quote Link to comment https://forums.phpfreaks.com/topic/227154-zend-mail-and-the-mac/ Share on other sites More sharing options...
gristoi Posted February 10, 2011 Share Posted February 10, 2011 try sending it through port 587 insted of port 25. Port 587 is only normally used for subbmission via authenticated users. but might be worth a try. Quote Link to comment https://forums.phpfreaks.com/topic/227154-zend-mail-and-the-mac/#findComment-1172351 Share on other sites More sharing options...
kreut Posted February 11, 2011 Author Share Posted February 11, 2011 Thanks so much for your reply. I actually had tried that as well without success. So...I think that I'll just test the mail on my remote server which will most likely work. Quote Link to comment https://forums.phpfreaks.com/topic/227154-zend-mail-and-the-mac/#findComment-1172718 Share on other sites More sharing options...
shlumph Posted February 11, 2011 Share Posted February 11, 2011 Try port 465 instead of port 25 Quote Link to comment https://forums.phpfreaks.com/topic/227154-zend-mail-and-the-mac/#findComment-1172722 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.