PDA

View Full Version : sending mail with php



grim918
December 26th, 2005, 12:36 AM
how do you send mail with php. im trying to code a user registration script that will send an e-mail for verification.
from what i know, php has the mail();
this is how im using my mail function

mail($recipient,$subject,$msg,$mailheaders);

everything seems to be ok but i read that you have to go into the php.ini file
and make some changes. does anyone know what changes need to be made.

sapo
December 26th, 2005, 12:56 AM
how do you send mail with php. im trying to code a user registration script that will send an e-mail for verification.
from what i know, php has the mail();
this is how im using my mail function

mail($recipient,$subject,$msg,$mailheaders);

everything seems to be ok but i read that you have to go into the php.ini file
and make some changes. does anyone know what changes need to be made.
I never had to configure anything, just make sure your sendmail is working properly, and the mail function should work.

btw..

http://www.php.net/manual/en/ref.mail.php

grim918
December 26th, 2005, 06:35 AM
how do i check if sendmail is working properly and if its not how can i fix it. when i run my scripts i dont get any type of errors it executes without problems but when i check the mailbox that i want to send the message to i dont get nothing. i think that i might have a problem with sendmail. thanks for your help

grim918
December 27th, 2005, 03:44 PM
ok i got it working.i had to sudo apt-get install sendmail.
i thought that sendmail was installed by default. thanks for the help.