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.
Related
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.
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.
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.
I am trying to create a web service using C#/.Net that can remotely access any user's lotus notes mailbox, contacts, etc. That is given the sever address and username/password details I want to send mails, create contacts, etc. Much like what one might do with EWS managed API for exchange accounts. I am currently using interop.domino.dll for this. It hasn't worked for me so far.
var session = new NotesSession();
session.InitializeUsingNotesUserName("username", "password");
var db = session.GetDatabase( "server", "xyz.nsf", false );
throws exception saying "user is not a server" or
"Failed to read server configuration"
I am a total lotus newbie and any help would be appreciated.
You mixed the server and client way to access the NotesSession. You have two choices:
Client Way
session.Initialize("password"); or session.Initialize();
Install a Notes Client and use Initialize(). If the client is started you do not need to provide a password. If the client is not started a password query will appear. The client is using the configured notes.id and needs that password. You could create a superuser id, that is capable to access all mail file and you do the authentication on your own. Initialize (NotesSession - LotusScript®)
This also should work on a server, but never tried this.
Server Way
session.InitializeUsingNotesUserName("username", "password");
I never tried this, but mistakenly used the method, so I know it's an error to use it with a client.
Theoretically: You Install a Domino Server and use the username and http-password of a user to identify as this user. I don't know if the dll find the right installation if you mix Notes Client and Server on on computer. Theoretically this could be controlled by the path variable, which executables the dll can reach via path. InitializeUsingNotesUserName (NotesSession - LotusScript®)
Domino Server on Windows Client: You can install a Domino Server on a Windows Client for testing purposes, the server will have limited network connections, because of the windows client, but it's utilizable for development. Bear in mind the EULA for Microsoft and IBM.
interop.domino.dll is not in focus of IBM any more. So think about what Richard Schwartz said and focus on the existing REST API or write your own web services as Notes Database and access it from C# as web service.
Runtime exception is:
The transport failed to connect to the server
Please give me any of your suggestions.
As I am working on my own pc so i do not have any mail server so i put the name of my internet broadband provider (SmtpMail.SmtpServer = "smtp.virginmedia.com";) Is it the right way?
Make sure that the server accepts your connection.
The first step is to read the error message.
At a guess, I would say that this error is caused because the web application is unable to connect to a particular server. Then we go look up the documentation for SmptMail class to see what could cause that.
The first thing we see is that the System.Web.Mail API is obsolete and that you should use System.Net.Mail.SmtpClient instead.
It could be because
your smtp server name does not resolve
your smtp server ip or port is incorrect
your smtp server requires authentication
your smtp server requires ssl
You will need to check with your provider to see if they support SMTP and to get the correct server address. You might consider installing an SMTP server on your machine.
You might also want to try using an SMTP test tool. This is a quick and easy way to test different settings without having to deal with any other possible issues in your own code. There are a few good ones out there. I've used one before but I don't remember which one, sorry.
I'd recommend that you try using System.Net.Mail instead of SmtpMail, but that may not solve your connection problem.
Before you get too wrapped up in diagnosing connection problems in your project, make sure you can send a message using a standard email client like Outlook or Pine. Then copy your settings from the mail client into your code or into your web.config file to set the SMTP server connection.
If you are using a hosting service they likely have permissions fairly strict on the server.
In a lower trust mode on the server, all SMTP connections must be setup using web.config. If you try to pass a address inline in your code you violate trust conditions.
SMTPClient Half Working \ Half Not