Email not going from app installed on AWS - spring-mvc

I have my spring web application hosted on AWS. After user signup it should send email to given email. But i can see that its not sending any email.
I am using a gmail account as sender of email.I don't see any exception or error also in my log.

You can check the ports, iptables(firewall),
Try sending a test email from the prompt/Bash.
for testing Linux
for testing Windows
If success, with the test, then work on the application.

Related

how can Azure Web App receive email SMTP?

My .NET web app presently uses Azure Windows server VM to receive and send SNMP email. My users send email to my web app, and my Windows server VM receives this email into its SNMP and then deposits it into a folder, which gets read by my backend .NET app.
I'm interested in switching to the new Azure web app model, but can't find anywhere how it would receive email.
My DNS provider uses my MX RECORD configuration to forward email from my users to the IP of my present VM server and then to its SNMP receive service, etc.
To receive email with a Web App in Azure App Service, you can setup a Web Job that can poll for new emails on a Schedule or Manual trigger, then perform a custom action necessary.
Another alternative is that you could create an Azure Logic App that is wired up to be notified of email messages. This can be done using the Outlook connectors (if you're using an Outlook email) or other connectors. Then the Logic App can be setup to make an API call to your app to trigger some sort of custom action to take place for emails received.
The configuration you have today on a full VM can not be implemented in Azure App Service Web Apps. The underlying managed VM that hosts the Web App isn't accessible and configurable in this way.

Can Azure Web App receive email SMTP, and send email (SendGrid)?

Presently I use VisualBasic .NET web app (with SendGrid for email) running on my Azure server VM. I receives SMTP email from public Internet directly to the VM ok. It send email using SendGrid addon ok.
Will this all work if I switch to Azure Web App (formerly Web Site)?
Should my web app code work as-is without modification, even the SendGrid calls?
Outgoing email using SendGrid will not be a problem at all. Using it on App Service is common and you probably don't need to change any code at all.
Inbound may require changes depending on what you're doing. Are you simply polling a mailbox somewhere else and then doing something with the messages? If so, you could convert that to a scheduled WebJob poll at a specific interval and act on incoming messages.
If you're running an SMTP server on your VM to receive mail, then that's something you cannot easily replicate on App Service.

SMTP email in Azure

I have an asp.net application where email is being sent via SMTP. If a user is listed in To as well as in Cc, the user is receiving the email twice. This happens only when the application is running in Azure. Doesn't happen when running on on-premise server. Any idea what needs to change in Azure world?
Yes that's how it should be and there is nothing wrong. It's not related to Azure at all. Ty testing the same in your office SMTP server and you will see same effect.
You should remove the recipient from cc list if it's not meant to be present.

Wordpress smtp.google.com issue on Windows azure

When sending gmail SMTP mail from Wordpress on a windows Azure website, something goes terribly wrong.
I managed to send once or twice a message, but mostly the authentication get's denied. And we get a lot of message of gmail, asking if we authenticated. Or if we are hacked.
Now the weird thing is that when i log in to the Gmail account on MY computer. Go to the following url and accept: https://accounts.google.com/b/0/DisplayUnlockCaptcha .
it suddenly works (for some time, and only form my pc).
As the worpress website is hosted on a Windows azure website, we can not log in on the server to navigate to this url:https://accounts.google.com/b/0/DisplayUnlockCaptcha from there.
Anyone got a solution for this issue? (As i don't have RDP on our azure Website, we can't access the machine to whitelist the ip).
Reference: https://support.google.com/mail/answer/10336?hl=en
You can try to generate an application-specific password for your gmail SMTP if you enable 2-step verification. That may help you to avoid manual CAPTCHA resolve.
I would still like to recommend SendGrid as you are using Azure. SendGrid is provided as an add-on in Azure. You can easily apply a SendGrid service and get 25,000 email per month for free.

How do I send SMTP mail from a Azure website?

I'm using the smtpclient class to send email from my asp.net website hosted on Azure in the 'shared' setup. Everywhere it says that port 25, and ALL ports are open on the Azure servers. My code works from my onw pc, but when published on Azure, it breaks. I am using gmail port 587 secure smpt and I get the error System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required.
Any ways to get around this? (Without installing a vm with Exchange on it, like ocme on, it's a simple email message).
You are getting that error because of these two possible reasons:
You are using the SMTPClient of Gmail and you are passing the EmailId of some other website like Yahoo/Hotmail etc.
EmailId you are using is not authenticated, you need to provide your mobile number to authenticate your Email Id.
If you are using Yahoo/Hotmail then you can refer to this article which I had created on http://www.c-sharpcorner.com/
http://www.c-sharpcorner.com/UploadFile/cd7c2e/send-bulk-email-from-yahoo-and-hotmail-using-Asp-Net/

Resources