Sending mail from .NET application Sending mail from .NET ap...

Argomento: Sending mail from .NET application

Post Sending mail from .NET application
di Greenwave su venerdì 7 ottobre 2022

I am trying to send emails via Dynu SMTP Relay from a .NET application.
See below for the code I am using for sending mail.

MailMessage message = new MailMessage(SENDER_ADDRESS, gsEmailAddress);
message.Body = "text";
message.Subject = "subject";
SmtpClient smtp = new SmtpClient("relay.dynu.com");
smtp.Credentials = new System.Net.NetworkCredential(SMTP_username, SMTP_password);
try {
smtp.Send(message);
} catch (Exception ex) {
}

When I execute the code, I receive the error message “SMTP authentication is required”.

Is there anything I am missing?
Is it not possible to use SMTP Outbound Relay from our own application?

Rispondi con citazione | Segnalare
Post Re: Sending mail from .NET application
di patsitsolutions su venerdì 7 ottobre 2022

Shouldn't smtp.dynu.com be used instead?

Rispondi con citazione | Segnalare
Post Re: Re: Sending mail from .NET application
di Greenwave su sabato 8 ottobre 2022

patsitsolutions wrote:Shouldn't smtp.dynu.com be used instead?
Thank you for the suggestion.
I tried with smtp.dynu.com, but received the same error message.

Rispondi con citazione | Segnalare
venerdì 22 novembre 2024 11:37
Loading...