Sponsored By

Sign in to follow this  
Matt

Php Mail()

Recommended Posts

I'm trying to send email though php. I'm on Ubuntu, I have apache2, and postfix installed. Here's my script and the chunk from my php.ini:

<?php
$to = "[email protected]";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
mail($to,$subject,$message);
echo "Mail Sent.";
?>

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
sendmail_from = [email protected]

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = /usr/sbin/sendmail -t

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =

It echos 'Mail Sent' but I am not receiving anything.

Let me know if you see any errors or need more information.

Thanks. :)

Share this post


Link to post
Share on other sites

Whose your ISP?

Some ISP's block port 80 to prevent the setup of webservers (easy get around).

If the SMTP port (25) is blocked, then you can use another port, cant' ya?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this