0
I use EasyPHP as a devserver on my computer. And for testing purpose, I have been using PHP mail() function to send emails from my computer to my Gmail account and then receive those emails by using email clients (Microsoft Outlook, Mozilla Thunderbird, IBM Lotus Notes, etc) installed on my computer. That requires internet connection.
I'm wondering if it is possible to send emails directly to my email clients on my computer? That means doing everything completely offline and being without internet connection.
Not sure if I understand that correctly, but aren't my email clients' settings supposed to change accordingly? By any chance, is there a step by step tutorial? – Ian Y. – 2016-08-12T07:33:32.493
What do you mean? I wrote you need to "add profile to your email client". – techraf – 2016-08-12T07:35:46.873
My bad. I didn't realize the last line is talking about that. I will try if I'm able to progress. – Ian Y. – 2016-08-12T07:37:42.197
hMailServer documentation is pretty simple, but it's more general. You shouldn't have problems configuring it on localhost. And you can always ask on SuperUser if you run into a problem. – techraf – 2016-08-12T07:40:02.933
In your case for hMailServer it should be enough to install, perform the configuration from the "domains & accounts" section in the included link, add a profile to your mail client. All other defaults should work. – techraf – 2016-08-12T07:52:42.540
After setting up hMailServer and adding a test account, I'm able to use the test account to send emails to itself and receive those emails in my email clients. I feel I'm close. Now I need to be able to use PHP mail() function to send emails to the test account. However, after I changed the value of the
SMTP
parameter tolocalhost
(the same value I set for the SMTP server fields in profiles in my email clients) in php.ini and tried sending an email, PHP shows this error:Warning: mail(): SMTP server response: 530 SMTP authentication is required. ......
Could you please advise? – Ian Y. – 2016-08-12T10:19:27.547Problem solved. After I unchecked the "External to local e-mail addresses" option in the authentication setting of hMailServer, everything works fine. Thank you very much! – Ian Y. – 2016-08-12T10:42:17.720
Well done! Glad it worked for you, enjoy coding now ;-) – techraf – 2016-08-12T11:16:57.123