Xampp and email sending

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

Xampp and email sending

Postby xamppliker » 28. January 2013 19:26

Hi there,

how do i send emails via myphpAdmin so I can test my script
xamppliker
 
Posts: 16
Joined: 25. November 2012 16:16
XAMPP Version: 5.6.3
Operating System: windows 7x64

Re: Xampp and email sending

Postby JonB » 29. January 2013 16:05

I am afraid "myphpAdmin "(I think you mean phpMyAdmin) has nothing to do with that.

phpMyAdmin is an administrative shell for MySQL.

The 'answer' to sending email via php is to edit your php.ini and configure sendmail or use mailtodisk.

Good Luck
:)



ysf
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Xampp and email sending

Postby xamppliker » 04. February 2013 13:47

Thanks for that, but I am confused as to what to do with both sendmail and the php.ini

I have found where you have to the settings, but still confused as to what to put

I will be using yahoo's settings
xamppliker
 
Posts: 16
Joined: 25. November 2012 16:16
XAMPP Version: 5.6.3
Operating System: windows 7x64

Re: Xampp and email sending

Postby JonB » 06. February 2013 06:02

I can't help you very well on what "Yahoo's settings" are, you should check their help pages. You will need their SMTP server URL, and the correct port number credentials etc.

You edit those into sendmail.ini file.

Code: Select all
[sendmail]

smtp_server=smtp.myisp.net

; smtp port (normally 25)

smtp_port=25

; SMTPS (SSL) support
;   auto = use SSL for port 465, otherwise try to use TLS
;   ssl  = alway use SSL
;   tls  = always use TLS
;   none = never try to use SSL

; smtp_ssl=auto

; the default domain for this server will be read from the registry
; this will be appended to email addresses when one isn't provided
; if you want to override the value in the registry, uncomment and modify

;default_domain=mydomain.com

; log smtp errors to error.log (defaults to same directory as sendmail.exe)
; uncomment to enable logging

error_logfile=error.log

; create debug log as debug.log (defaults to same directory as sendmail.exe)
; uncomment to enable debugging

;debug_logfile=debug.log

; if your smtp server requires authentication, modify the following two lines

auth_username=jonb@myisp.net
auth_password=jonspassword



That is taken from a working XAMPP 1.8.0 install. All I changed is the ISP name and the pw. I Can't tell you if Yahoo's SMTP server uses port 25 or if it requires SSL etc. You will have to get that information from them.

The php.ini [mail function] section also needs to be edited (or not) to have one line like this:

Code: Select all
sendmail_path = "\"\xampp\sendmail\sendmail.exe\" -t"


That should probably be the only uncommneted line in the [mail function] section other than these two

Code: Select all
mail.add_x_header = Off     


or On - adds a line to the x_headers for the php information

and

Code: Select all
mail.log = "\xampp\php\logs\php_mail.log"


if you want to log your php_mail

That also comes from the same working XAMPP install.

Good Luck
:)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Xampp and email sending

Postby xamppliker » 06. February 2013 09:40

OK, thanks but I am now thinking there is something wrong with my script
xamppliker
 
Posts: 16
Joined: 25. November 2012 16:16
XAMPP Version: 5.6.3
Operating System: windows 7x64

Re: Xampp and email sending

Postby xamppliker » 10. February 2013 09:15

Hi there, is this to actually send mail or just to log whether the script is working?
xamppliker
 
Posts: 16
Joined: 25. November 2012 16:16
XAMPP Version: 5.6.3
Operating System: windows 7x64

Re: Xampp and email sending

Postby JonB » 10. February 2013 20:04

'Sendmail.exe' is to send mail. There's 'mailtodisk' for emulation.

:)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Xampp and email sending

Postby xamppliker » 10. February 2013 20:31

Then there is something not making it send the mail
xamppliker
 
Posts: 16
Joined: 25. November 2012 16:16
XAMPP Version: 5.6.3
Operating System: windows 7x64

Re: Xampp and email sending

Postby JonB » 11. February 2013 23:07

Try using mailtodisk - if it works, then you know its a 'mailer' problem and not the code/script

Good Luck
:)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Xampp and email sending

Postby xamppliker » 12. February 2013 12:04

Can't actually believe that it was sending it to disk in the first place
xamppliker
 
Posts: 16
Joined: 25. November 2012 16:16
XAMPP Version: 5.6.3
Operating System: windows 7x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: ramasubburam and 62 guests