Reputation: 599
I am working on ecommerce website in nopcommerce. I wanted to send the mail ,when the user has already registered before and trying to register again with the same email id.Mail contains the body content as "the username of this user is some username".When i wrote the code and executed it, its working fine on local.But when i run it in the server (after creating a new website in the IIS server),the mail is not sent.Another thing is that the page i created ,which will show up as"mail is successfully sent" shows up in the local.But it doesnot showup in the server even though the url is the same.Can anyone suggest me the solution.
Upvotes: 0
Views: 891
Reputation: 11
This solution requires sendmail.exe (a Command Line Interface (CLI) executable which accepts email from PHP, connects to an SMTP server and sends email). You will not require to use it by command, don’t bother about it :-) Download the sendmail.zip and follow these steps:
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.
Upvotes: 1