SMTP client script for c# (ASP.NET core mvc)

Hi, I’m using cloudflare DNS on my godaddy account, and I have some emails that are on my domain, the emails are working perfectly, they send and receive with no issues.

What I’m trying to do is that I’m trying to send email messages through a C# application, I tried it with my Gmail email and it worked (using this smtp client script: ‘var client = new SmtpClient(“”, 587)’), but i want to send email messages using my domain email, so what I’m stuck at right now is that I don’t know what is the smtp script for cloudflare (it shall be something like this “” I tried this one but it didnt work).

In fact, I have another domain that is associated with Zoho, and I tried the email of this domain with this script: “” and it worked, it did send the email messages perfectly.

So now I just need to know what is the smtp client script for cloudflare so I can send the email messages from my godaddy domain email that is associated with cloudflare.

Thanks in advance.

I am going to concentrate on the below:

You would not use any related mail/smtp server. It will not work.

Cloudflare sits in front of your web property. To send emails from your website domain EG: [email protected] you would need to get this email hosted somewhere and follow setup of MX DNS records and other such things.

Read more here:

Along with:

1 Like