Share via

Mail from application

Anonymous
2020-09-01T09:15:19+00:00

I am trying to send email from my application but getting following error.

my email accout is: ******@eremit.sg

System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [SG2PR01CA0104.apcprd01.prod.exchangelabs.com]

at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)

at System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, MailAddress from, Boolean allowUnicode)

at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, Boolean allowUnicode, SmtpFailedRecipientException& exception)

at System.Net.Mail.SmtpClient.Send(MailMessage message)

at Emailservice.Service1.SendMail(String sendTo, String sendFrom, String sendSubject, String sendbody) in E:\Projects\M1\NewSmsAPI\m1remit-emailservice\Emailservice\Service1.svc.cs:line 221

Regards

Riyaz Ahmad

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

5 answers

Sort by: Most helpful
  1. Anonymous
    2020-09-01T15:17:51+00:00

    Well, the is a forum to discuss Microsoft Access database related issues.

    I'd suggest you post your question in a C# forum to get the help you seek.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2020-09-01T14:57:11+00:00

    Hi

    I am using C# code for it and also tested other mail its working perfectly fine.  We are having only issue with outlook 365 mail. 

    Regards

    Riyaz Ahmad

    Was this answer helpful?

    0 comments No comments
  3. George Hepworth 22,855 Reputation points Volunteer Moderator
    2020-09-01T14:31:17+00:00

    The "Access" in the name of this forum refers to the Microsoft Access application, which is part of the Microsoft Office suite of applications. Access is used to create relational database applications. 

    Clearly, "Access" in your error message refers to something else. 

    Perhaps there is a language hurdle at work. "Access" was chosen as the name for this Office application because it implies the ability to "access data", which is, essentially, a marketing thing.

    Access, as used in your error message, means the ability to get to the required service, and that's not the same thing at all.

    Try a forum dedicated to whatever software application you used to create that code, Visual Studio perhaps? C# perhaps?

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2020-09-01T13:23:45+00:00

    Hi 

    I am getting the following message at login history. 

    "Access has been blocked by Conditional Access policies. The access policy does not allow token issuance."

    With hotmail and gmail i am able send mail from my app. So, to allow SMTP login from my application do i need to make any changes at outlook admin portal. Waiting for your valuable suggession.

    Regards

    Riyaz Ahmad

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2020-09-01T11:23:41+00:00

    This doesn't look like Microsoft Access error codes, or VBA error codes?  Please explain further.

    The error message itself is plainly telling you the issue: "requires a secure connection or the client was not authenticated", so I'd be looking to insure I was using SSL/TLS and providing valid credentials.

    Was this answer helpful?

    0 comments No comments