How to send mail(gmail mail) programmatically without using SMTP server - c#

I am trying to send mail(using Gmail) using SMTP but somehow server is blocking to send emails.(Our application is hosted on GoDaddy server).
And it is showing below error,
An attempt was made to access a socket in a way forbidden by its access permissions 185.107.232.247:587

Make the change to your Godaddy account. "Check the SSL Full-time box"
Activate your gmail account. Check the SSL box. My settings are
smtpout.secureserver.net Port 465
name and password of your godaddy account
SSL box checked.
Once gmail is working, GO BACK and uncheck the Godaddy account SSL box referenced in 1, the gmail account still works.

Related

Gmail SMTP clien fails on Azure

When I send mail from local it works pretty well, but when I deploy on azure it fails.
Error: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Authentication Required. Learn more at
This generally happens when you try login from different time zone or IP Address Computer. Your production server and the mail id you have used both are in different time zone. Choose either of these two solutions:
Log in to production server via remote access, and sign in to gmail once with your credentials. They will ask for the confirmation, confirm it and log out. (If you are using a VM)
OR
log in gmail to your local computer, Follow this Link and choose review this activity and take proper actions.
Check out this SO question to know more (additionally you can verify Roshan Parmar's points from this): https://stackoverflow.com/questions/20906077/gmail-error-the-smtp-server-requires-a-secure-connection-or-the-client-was-not#:~:text=solution%20for%20case%201%3A%20Enter,to%20login%20from%20all%20apps.&text=Use%20that%20newly%20generated%20password%20to%20authenticate%20via%20SMTP.

Exchange Web Services (EWS) client doesn't work on server, but works locally

We have a simple service that uses EWS 2.0 to connect to an Outlook mailbox and process email in a shared mailbox (yup, I know :))... so...
We created a domain user and gave it full rights to the mailbox. I'm specifying the WebCredentials, and for accessing the shared mailbox, I new up a Folder object with the mailbox name and using StreamingNotifications to watch the inbox.
All works fine on my PC.
We tried installing it on a server and we get a 401 access denied. If I go to that machine and telnet to the EWS server on 443, it lets me in, so its not a firewall issue. Like I said, I can run the app on my PC, so the mailbox and exchange are configured to let me connect.
Do I need anything else open? Any ideas what's generating the 401?
I can post code if necessary, but like I said, it works on my PC and on the server I can telnet to the EWS on 443.
On the server, I'm running the app with my domain account logged in and a command prompt.
How do I debug further?

Configure SMTP Server to send mail

I have deployed a website (ASP.Net/C#) on my windows server 2012 R2 (it's a VPS and I installed IIS and SMTP), and everything works fine except one thing: I CANNOT send mail through my website!
I searched and tried everything but it still doesn't work! When I was debugging my application on local, it worked fine. Now I know I have to change my settings to send mail but I don't know what I should indicate
I'm sending my emails from a mail address that use pop3 server "relay.skynet.be" (this is the server I used when I was debugging and it worked) but when I do it on the website I got an error... So I changed it to the name of the server where my VPS is hosted (OVH) and it still doesn't work... I also changed the different credentials (in my code or in the SMTP in IIS) but the result is the same...
So I'm asking these questions:
In my code (C#), what should I indicate?? Which server should I indicate? And which credentials?
On Windows Server, in the SMTP settings in IIS, what should I choose? Should I indicate the e-mail address with which I send my emails? Do I have to check the "Use localhost" for the SMTP server to use or indicate the server of my mail address (relay.skynet.be) or the one from OVH? And for the credentials, what do I have to check? "Not required", "Windows" or "Specify Credentials" (with my mail address credentials?)
I have a strong feeling that you are simply missing the infrastructure - specifically, you are missing an SMTP server. SMTP server is responsible for delivering (or forwarding) your email.
Neither POP3 nor IMAP protocols are used for sending emails.
If this is the case, I suggest you try using hotmail or gmail mail account. You can find the settings for both here, respectively:
http://www.serversmtp.com/en/smtp-hotmail
http://www.serversmtp.com/en/smtp-gmail-configuration
Hope this helps.

How to Detect Email Bounces with IIS 6 with C#

Just as the question says.
I am using IIS 6 to send emails out from my Windows Server with C#. I want to detect bounces with C# from the SMTP email server. Right now, all the bounces get sent to a Gmail account. I could just check and parse each email in that account, but I was wondering if there is any easier way like hooking up a windows service or something to the IIS 6 SMTP server.
Help?
Thanks!
I know little about the IIS6 SMTP server, but based on what I know about SMTP in general, I doubt you're going to have much luck. Your message to joe#foo.com gets forwarded from server to server until it ends up at the foo.com SMTP server, which then responds to the reply-to address that the "joe" mailbox doesn't exist. That server may have no direct contact with your SMTP server at all.
As a result, there's no opportunity for the IIS6 SMTP server to receive any information about the bounced message. I think your existing idea of polling the inbox for the reply-to address is probably going to be your best bet.

How to send an email with authentication "none"?

I want to send an email with authentication type "none". I have read examples about how to do it with basic authentication, but I don't figure it out how to solve my problem.
When I try to connect to an Exchange mail server I get a socket exception:
No connection could be made because the target machine actively
refused it
I had wrote an unmanaged .dll in Delphi that can send emails, and in that project I had configured authentication type as none. So, I want to write basically the same in .net, but I don't know how.
Do you have an SMTP server that you can connect to that also does not require authentication?
If you're using Gmail's SMTP servers then you must authenticate against them using your Gmail account's username and password.
Otherwise, we need more information.
In the docs its says:
If the UseDefaultCredentials property is set to false and the
Credentials property has not been set, then mail is sent to the server
anonymously.
My program was rigth. .Net uses authentication type "none" by default if you don't specify any credentials.
A McAffee Enterprise antivirus installed on my pc was blocking me. Finally, when I deactivated the antivirus I could made work the program.

Categories

Resources