SMTP email in Azure - asp.net

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.

Related

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.

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/

How fix SMTP connection from an Azure Website?

Actually we have our website in WindowsAzure.
Its a Classic ASP site and its configured as a "Standard WebSite", 32Bit platform and its working with our domain.
As a traditional web, it uses a SMTP server to send email (ie. contacts from contact page).
We know Azure don´t provide SMTP server so we have tried with all these service with no luck:
RackSpace
Mandrill App
SendGrid (Recommended here).
For all of them, we are getting this error: "The transport failed to connect to the server."
How we can fix it?
Thanks,
We don´t know why but suddenly it begins to work.
The only change we did in the Azure config was putting ON the WebSockets but we think it was the solution.
We left the Mandrill smtp Server.

How do I configure TFS to work with GMail to send TFS Alerts?

Environment: Windows Server 2008, IIS 7.0, TFS 2008
We run Google Apps for email and I'm having a heck of time setting up TFS to send alerts to our Google hosted mail.
I googled around and found a couple of workarounds however none have worked for me. Any pointers graciously accepted.
Have you tried setting up an SMTP server on the same box as TFS, then configuring it to forward to GMail? That sounds like the easiest solution.
Alternatively, you could write a SOAP endpoint that handled TFS events with as many customizations as you want. This is a little more work but a lot more flexible.
I just ran through this problem in TFS-2013.
I think the root of the problem is that Apps must sign into Google Securely. For secondary apps, that means oauth. For those that can't, Google needs "Application Specific Passwords". Since it can't really trust the email application, it requires you to generate a random password for that specific account.
The solution for me was:
Enable Email Alerts
SMTP Server: smtp.gmail.com
port: 587
SSL Required: Yes
send from: email#mydomain.com
authentication:
username: mygmail#gmail.com
password: RANDOM APP PASSWORD
Can't you just configure TFS to send outgoing email through the Gmail servers?
http://msdn.microsoft.com/en-us/library/ms400808(VS.80).aspx
Does that not do what you need, or am I missing part of the question? We're using a local SMTP server to send email out, but I don't see a reason why you couldn't use a remote one instead.
I verified that WernerCD AppPassword solution works.

Resources