我在nopcommerce電子商務網站上工作。我想發送郵件,當用戶已經註冊之前,並試圖用相同的電子郵件ID再次註冊。郵件包含正文內容爲「此用戶的用戶名是某個用戶名」。當我編寫代碼並執行它時,但它在本地運行良好。但是當我在服務器上運行它(在IIS服務器中創建新網站後)時,郵件未發送。另一件事是我創建的頁面,它顯示爲「郵件是成功發送「顯示在本地。但它不會在服務器上顯示,即使url是相同的。任何人都可以告訴我解決方案。郵件發送本地主機,但不是在服務器
0
A
回答
1
此解決方案需要sendmail.exe(一個命令行界面(CLI)可執行文件,它接受來自PHP的電子郵件,連接到SMTP服務器併發送電子郵件)。您將不需要通過命令來使用它,不要麻煩了:-)下載sendmail.zip,並按照下列步驟操作:
Create a folder named 「sendmail」 in 「C:\wamp\」.
Extract these 4 files in 「sendmail」 folder: 「sendmail.exe」, 「libeay32.dll」, 「ssleay32.dll」 and 「sendmail.ini」.
Open the 「sendmail.ini」 file and configure it as following
smtp_server=smtp.gmail.com
smtp_port=465
smtp_ssl=ssl
default_domain=localhost
error_logfile=error.log
debug_logfile=debug.log
auth_username=[your_gmail_account_username]@gmail.com
auth_password=[your_gmail_account_password]
pop3_server=
pop3_username=
pop3_password=
force_sender=
force_recipient=
hostname=localhost
You do not need to specify any value for these properties: pop3_server, pop3_username, pop3_password, force_sender, force_recipient. The error_logfile and debug_logfile settings should be kept blank if you have already sent successful email(s) otherwise size of this file will keep increasing. Enable these log file settings if you don’t get able to send email using sendmail.
+0
請參閱此處的詳細說明:http://blog.techwheels.net/send-email-from-localhost-wamp-server-using-sendmail/ – Krishna
相關問題
- 1. 本地郵件發送,但上傳到服務器郵件不發送在asp.net
- 2. 從代理服務器的本地主機發送PHP郵件
- 3. 將郵件發送到本地主機Jetty服務器
- 4. 發送郵件在本地工作,但不在服務器上?
- 5. 爲什麼php使用PHPMailer從本地主機發送郵件而不是從服務器發送郵件?
- 6. PHP:在本地主機發送郵件
- 7. Javamail - 從本地主機而不是godaddy服務器發送
- 8. 通過本地主機服務器在asp.net發送電子郵件
- 9. 發送電子郵件到本地主機的SMTP服務器在Node.js的
- 10. Mercury:從本地主機發送郵件
- 11. 本地主機發送郵件到Gmail
- 12. 發送電子郵件本地主機
- 13. 通過本地主機發送郵件
- 14. 用phpMailer發送郵件,但在本地主機上工作
- 15. JSON工作在本地主機但不是服務器?
- 16. 郵件不發送從虛擬主機服務器
- 17. 當郵件服務器不在網絡主機上時發送郵件
- 18. 發送電子郵件,而不是本地主機與
- 19. 公共SMTP服務器 - 從本地主機WAMP發送電子郵件PHP
- 20. 無法從本地主機發送郵件(websphere應用服務器)
- 21. 從谷歌發送電子郵件失敗生產服務器上,但在控制器從本地主機
- 22. Tomcat服務器不在本地主機
- 23. 本地主機不會連接到郵件服務器
- 24. 通過gmail smtp在服務器發送郵件的問題,但在本地主機工作正常
- 25. 錯誤發送電子郵件在服務器領域的PHPMailer但在本地主機
- 26. 在本地xampp服務器發送郵件時發生錯誤
- 27. 本地主機不發送電子郵件在php
- 28. 郵件不在本地主機的Squirrelmail中發送
- 29. 本地主機服務器
- 30. PHP InstanceOf在本地工作,但不在主機服務器上
在上傳文件到你的服務器,你改變了SMTP主機? Mail服務守護程序是否已啓動並在您的服務器上運行? – verisimilitude
請參閱http://www.emailarchitect.net/webapp/smtpcom/developers/smtpservice.asp,http://forums.iis.net/t/1157046.aspx –
但所有其他電子郵件在服務器上成功發送,除此之外電子郵件 – Sharathsshetty