Php form mail issues

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Php form mail issues

Postby xenxarra » 15. July 2015 13:14

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:/
xenxarra
 
Posts: 2
Joined: 15. July 2015 12:14
Operating System: window 7 Home

Re: Php form mail issues

Postby cb » 16. July 2015 03:09

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
cb
cb
 
Posts: 36
Joined: 11. June 2008 22:48

Re: Php form mail issues

Postby xenxarra » 16. July 2015 14:18

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"
xenxarra
 
Posts: 2
Joined: 15. July 2015 12:14
Operating System: window 7 Home

Re: Php form mail issues

Postby Altrea » 16. July 2015 15:07

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.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Php form mail issues

Postby cb » 17. July 2015 00:30

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)
cb
cb
 
Posts: 36
Joined: 11. June 2008 22:48


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 104 guests