Page 1 of 1

Php form mail issues

PostPosted: 15. July 2015 13:14
by xenxarra
Hello, I have set up mercury it all seems to work when I send am email though outlook using my root@lochost.com ,Mercury receives it then send it on. I did also test it though mercury internal mail centre and work there, but when I go and send a php form the form looks to or send and I get me conformation page say it does I looking in outlook no email. Nothing in junk/spam mail, I look in the Mercury the pop serve tell me no message or mail has been received. I have since found that there are files in the mailoutput directory inside the xampp folder of C:/

Re: Php form mail issues

PostPosted: 16. July 2015 03:09
by cb
You need to edit the php.ini file - in the [mail function] section,

1) Uncomment/set the smtp = <host> and smtp_port = <port> to appropriate values.
2) Change the line sendmail_path="C:\Xampp\mailtodisk\mailtodisk.exe" to be a comment

And then restart Apache

Re: Php form mail issues

PostPosted: 16. July 2015 14:18
by xenxarra
These are my setting that it not work on

[mail function]
; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury
SMTP = localhost
smtp_port = 25

; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = postmaster@localhost

; XAMPP IMPORTANT NOTE (1): If XAMPP is installed in a base directory with spaces (e.g. c:\program filesC:\xampp) fakemail and mailtodisk do not work correctly.
; XAMPP IMPORTANT NOTE (2): In this case please copy the sendmail or mailtodisk folder in your root folder (e.g. C:\sendmail) and use this for sendmail_path.
; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder)
;sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"

; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the C:\xampp\mailoutput folder
sendmail_path="C:\xampp\mailtodisk\mailtodisk.exe"

Re: Php form mail issues

PostPosted: 16. July 2015 15:07
by Altrea
xenxarra wrote:; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder)
;sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"

; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the C:\xampp\mailoutput folder
sendmail_path="C:\xampp\mailtodisk\mailtodisk.exe"

mailtodisk is commented out so mailtodisk will be used.

Re: Php form mail issues

PostPosted: 17. July 2015 00:30
by cb
Just to clarify -
"Change the line sendmail_path="C:\Xampp\mailtodisk\mailtodisk.exe" to be a comment"
means to change
sendmail_path="C:\Xampp\mailtodisk\mailtodisk.exe"

to be
;sendmail_path="C:\Xampp\mailtodisk\mailtodisk.exe"

so that mailtodisk will not be used

(There might be a misunderstanding with the english wording :D - my interpretation (as a native english speaker) of "commented out" means the code line has a comment applied. Uncommenting means to remove the comment

So "; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the C:\xampp\mailoutput folder"
should really be -
; XAMPP: Comment out this if you want to send emails. Using mailToDisk, will write all mails to the C:\xampp\mailoutput folder)