I can send my emails in localhost flawlessly. but ever since I uploaded my program into a hosting site I get this error
Expected response code 250 bu
I've a working laravel swiftmailer using google server. Here my steps:
I edited .env file as like below:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=username //i.e. username@gmail.com
MAIL_PASSWORD=password //Gmail accounts password
MAIL_ENCRYPTION=ssl
Edit username and password with your own.
In my controller, I wrote the following code:
$rawData = request::all();
Mail::queue('program.meeting.emailInvite', $rawData, function($message) use ($rawData)
{
$message->from('info@echosofts.com', 'Echosofts')->to(array_map('trim', explode(',', $rawData['all_email_id'])))->subject($rawData['mail_title']);
});
Then email was working fine except the sender email ID was my google account (username@gmail.com) instead of info@echosofts.com.
"Setting icon"-> Settings -> Accounts and Import->Send mail as->Add another email address your own.
The following settings depends on your configuration.
Email address: info@echosofts.com
SMTP server: mail.echosofts.com
Username: info@echosofts.com
password:**********
Port:25