Jump to content

Server not sending email with php


Lee

Recommended Posts

Hi, I hope you don't mind me asking here.
Can anyone give me an idea why my server won't send emails through php?

I have set php.ini like this & re-booted..
[code]
[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 -i[/code]

Is there anything else I could try to get it to work?

Thanks.
Link to comment
https://forums.phpfreaks.com/topic/22826-server-not-sending-email-with-php/
Share on other sites

I'm not sure if this is it, but it IS something at least seems out of place.

It says "For Win32 [b]only[/b]" and "For Unix [b]only[/b].  But neither line is commented out.

Are you on Win32?  Or are you on Unix?  Are you using SMTP to send?  Or sendmail?  If using SMTP, have you specified your username and PW?

Also, what does the code look like that you're using to send the message?  Maybe there's something wrong with THAT?
Its a unix server, and I am trying to use sendmail.

Its definately not a code problem because it works fine on another server, and also, I have a CH-phpBB board which is also not sending mail.


[code]
//sending sign-up e-mail (validation notice)
$val_key=$email.time();
$val_key=md5($val_key);
$sql_query="insert into validate (email,password,val_key) values ('$email','$password','$val_key')";
sql_execute($sql_query,'');
$data="<a href='$main_url/index.php?mode=join&act=val&val_key=$val_key&inv_id=$inv_id'>Verify Email</a>";
messages($email,'0',$data);
[/code]

Thanks :)

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.