Janvk82
  • Janvk82
  • 50.75% (Neutral)
  • Newbie Topic Starter
10 months ago
I was always using the access vba cdo.message

I am orientating on purchasing the EmailArchitect ActiveX

I installed the trail today and made the reference.
I am using a outlook.com account, with a app password setup and also filled here. Tested all kind of ports and also the osmtp.connectType tryed= 0-4. Different servers smtp.office365.com etc But getting the error :


Failed to send email with the following error: Error with user authentication; Server says: 535 5.7.139 Authentication unsuccessful, basic authentication is disabled.
[AM0PR08CA0007.eurprd08.prod.outlook.com #timestamp#]



I am using a test button with this code



Dim oSmtp As New EASendMailObjLib.Mail

oSmtp.LicenseCode = "TryIt"
oSmtp.LogFileName = "C:\ASP-Faktuur\smtp.txt"

' Set your sender email address
oSmtp.FromAddr = "jvksender@outlook.com" 'DLookup("smtpuser", "tblInstellingen")

' Add recipient email address
oSmtp.AddRecipientEx "Info@J****g.nl", 0
oSmtp.AddRecipientEx "CC j**k@z****t.nl", 1

' Set email subject
oSmtp.Subject = "Testmail"

' Set email body
oSmtp.BodyText = "Testbericht"

' Your SMTP server address
oSmtp.ServerAddr = "smtp-mail.outlook.com"

' User and password for ESMTP authentication, if your server doesn't require
' User authentication, please remove the following codes.
oSmtp.UserName = "jvk***r@outlook.com"
oSmtp.Password = "q******m"

' Set 25 SMTP port
oSmtp.ServerPort = 587
oSmtp.ConnectType = 1 'ConnectSSLAuto
' Enable TLS connection

MsgBox "start to send email ..."

If oSmtp.SendMail() = 0 Then
MsgBox "email was sent successfully!"
Else
MsgBox "failed to send email with the following error:" & oSmtp.GetLastErrDescription()
End If



What am I doing wrong ? Could someone point me to the right direction ? Can't find anything in the documentation about basic authentication
ivan
  • ivan
  • 100% (Exalted)
  • Administration
10 months ago
That is because Microsoft has disabled user/password login in personal account. You have to switch to OAUTH:
https://www.emailarchitect.net/easendmail/ex/b/22.aspx 

Please refer to the full sample project in C:\Program Files (x86)\EASendMail\Samples_VB6\Oauth

EXPLORE TUTORIALS

© All Rights Reserved, AIFEI Software Limited & AdminSystem Software Limited.