Sending mail from .NET ap...
Sending mail from .NET application
- 主页
- 后台控制中心
- Community Forum
- Services
- Email Service
- Sending mail from .NET application
- Community Forum
- Sending mail from .NET application
Topic: Sending mail from .NET application
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?
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?
Reply with quote |Report
patsitsolutions wrote:Shouldn't smtp.dynu.com be used instead?
I tried with smtp.dynu.com, but received the same error message.
Reply with quote |Report
| Author | Topic: Sending mail from .NET application |
|---|---|
|
Greenwave Joined: 2022/10/5 |
2022年10月7日星期五 上午1:28
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? |
|
patsitsolutions Joined: 2018/1/11 |
2022年10月7日星期五 下午12:20
Shouldn't smtp.dynu.com be used instead?
|
|
Greenwave Joined: 2022/10/5 |
2022年10月8日星期六 上午12:08
I tried with smtp.dynu.com, but received the same error message. |
2026年6月13日星期六 上午10:21
