Jump to content

Archived

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

Lee

Server not sending email with php

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 = lee@mydomain.com

; 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.

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites
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 :)

Share this post


Link to post
Share on other sites

×

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.