Jump to content

Zend Mail and the Mac


kreut

Recommended Posts

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' => '[email protected]',
				'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('[email protected]','Eric Kean');
$mail->setFrom('[email protected]', '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.  :shrug: Any help would be appreciated...

 

Thank you...

Link to comment
https://forums.phpfreaks.com/topic/227154-zend-mail-and-the-mac/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.