Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Mail

test the mailing script

the mail() function

Moderators: macek, egami, gesf

test the mailing script

Postby emertana » Sun Jul 17, 2011 7:54 pm

Hi guys,

I am using Mac OS, netbeans, Mamp pro to send an email using php, I need to send email to all domains.
I did try to configure the Postfix but has not been successful, ( it always returns 1 but email wont be received)
looking forward for your help.

$to = ‘my email address goes here';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: my email address goes here ' . "\r\n" .
'Reply-To: my email address goes here' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

$return = mail($to, $subject, $message, $headers);


echo $return;
emertana
New php-forum User
New php-forum User
 
Posts: 1
Joined: Sun Jul 17, 2011 7:48 pm

Re: test the mailing script

Postby Nullsig » Mon Jul 18, 2011 8:07 am

Is the MAMP server using postfix or are you using sendmail?

I had a similar issue and after messing around with postfix for a long time I basically gave up. To fix it I removed anything that even looked like it might have to do with mail and then just reinstalled (in my case) the LAMP server. After that every thing worked just fine with the default settings.
User avatar
Nullsig
php-forum Fan User
php-forum Fan User
 
Posts: 981
Joined: Thu Feb 17, 2011 6:52 am
Location: Racine, WI

Re: test the mailing script

Postby Fahad » Mon Jul 18, 2011 10:13 pm

Thanks to u
Fahad
New php-forum User
New php-forum User
 
Posts: 4
Joined: Mon Jul 18, 2011 10:10 pm


Return to PHP coding => Mail

Who is online

Users browsing this forum: No registered users and 4 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.