sendmail.exe opens on sending mail

回眸只為那壹抹淺笑 提交于 2019-11-28 14:01:09
Yahya Uddin

This part is a copy & paste of post: Sendmail Wamp Php

The problem is that sendmail has to be run as an administrator. This is the solution to help any one on my situation.

  1. Right click on sendmail.exe
  2. Properties
  3. Compatibility
  4. Change the configuration for all users
  5. Execute as Windows XP SP 3
  6. Execute as adminitrator

    if you using gmail you need create new password "Your application-specific passwords"

If that still dosen't work (My answer)

Make sure the server (or IDE) is being run as admin, by either:

1) Right clicking the program (e.g. server, ide, command prompt) and clicking "Run as Administer"

2) OR Right click program> properties> compatiblity> Tick execute as admin

For instance if your using the PHP in built server, run the command prompt as admin and start the server as normal using

C:\wamp\bin\php\php5.5.12\php.exe -S localhost:80 -t C:\Users\path\to\rootFolder

Of course change the file paths to suit your needs.

EDIT: This is probally the bug you headed into https://bugs.php.net/bug.php?id=44994

solution is setting up sendmail.ini and php.ini

you need to communicante with your isp to find out what is there open smtp server most of them have one and it is like smtp.yourisp.com most of the time.

you may also setup the smtp using your own email sever or existing email address this will require additional settings such as specific smtp server, portnumber, forcing the sendmail from to be the actual mail, username, password and most of the time ssl

php.ini

; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury  SMTP = smtp.yourisp.mu  smtp_port = 25

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

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

Making sure that php and sendmail are run as administrator seems a good idea but this did not solved my problem.

Solution in sendmail.ini

smtp_server = smtp.yourisp.com

; 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=none

do not use smtp_ssl = auto that was what was causing my bug just set it to ssl tls or none according to specification of your server

Make sure XAMPP is run as Administrator. Do that by right clicking on it and clicking on "Run as Administrator." That fixed it for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!