0

For sending email I normaly use Windows 7 Thunderbird with configuring secure SMTP via my ISP (i.e. login and password for SMTP server). Connection security: none, Password transmited insecurely. Mails are send OK.

I tried configure XAMPP php.ini

[mail function]
SMTP=*my_isp_smtp_server*
smtp_port=25
sendmail_from=*my_email_address*
sendmail_path="\"c:\xampp\sendmail\sendmail.exe\" -t"
mail.add_x_header = Off

and sendmail.ini

smtp_server=*smtp_server.my.isp*
smtp_port=25
error_logfile=error.log
debug_logfile=debug.log
auth_username=*login_to_my_isp_smtp_server*
auth_password=*password_to_my_isp_smtp_server*
force_sender=*my_email_address*

In my php script I use standard php function:

mail($recipient, $subject, $message, $headers);

I get no error message, but mail is not delivered. Please could you help me anyone?

PeeHaa
  • 71,436
  • 58
  • 190
  • 262
user2979280
  • 9
  • 1
  • 2
  • Have a look [here](http://stackoverflow.com/questions/18586801/send-email-by-using-codeigniter-library-via-localhost), haven't tried it myself yet, but the settings of this CodeIgniter question/answer might help you out. Comments there say that localhost will only work with Gmail. For all others you'll need live hosting (so no localhost). – rkeet Nov 11 '13 at 14:25

1 Answers1

-1

For everyone still struggling with this issue while looking for a solution, using sendmail package, you can configure it to use SMTP secure servers like gmail. For simplicity I will show down below an example using gmail servers, but you can set your own SMTP server using hMailServer . Documentation is available here and it uses port 465 for TLS. You just need to change, from the following gmail configuration, the SMTP server, port, address and password. The structure stays the same.

hmailserver

If you want to go for gmail route, as an example, check these parameters here: gmailserver

Understood so, make the following changes:

In C:\xampp\php\php.ini uncomment extension=php_openssl.dll and restart Apache to add SSL support. Also change these values as in the documentation guide and set sendmail_from accordingly:

SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = yourgmailaddress@gmail.com
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"

And in C:\xampp\sendmail\sendmail.ini mirror these changes:

[sendmail]

smtp_server=smtp.gmail.com
smtp_port=587
auth_username=yourgmailaddress@gmail.com
auth_password=yourgmailpassword
force_sender=yourgmailaddress@gmail.com
Fabio Crispino
  • 711
  • 1
  • 6
  • 22