Problem with Outlook Office 365 email

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
RMan
User
Posts: 221
Joined: Tue Jul 02, 2013 10:06 pm

Problem with Outlook Office 365 email

Post by RMan »

We recently switch our email to Office365 with Godaddy and we have our email setup to allow SMTP authentication

This is the error we are getting in Version 9.5 build 366.0.
image.png
It appears to be similar to this post.
viewtopic.php?p=162903#p162903

Programming wise I can send SMTP email to the account using both VB6 and VB.Net so it's not an account problem.

Our web applications using VB.Net uses the System.Net.Mail.SmtpClient
SMTP = New System.Net.Mail.SmtpClient()
The main line we had to change in that code when moving from our old email was:
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12

Other than that we are using host="smtp.office365.com" port="587" enableSsl="true"

In VB6 I did a quick test to send via smtp using the old Microsoft CDO in VB6 and that works using port 25 since CDO does not support TSL 1.2?

Code: Select all

Sub SendMessage(ByVal MailFrom As String, ByVal MailTo As String, ByVal Subject As String, _
ByVal Message As String, ByVal FileName As String, ByVal Username As String, ByVal Password As String)
    On Error GoTo ErrMsg
    Dim ObjSendMail
    Set ObjSendMail = CreateObject("CDO.Message")

    'This section provides the configuration information for the remote SMTP server.
    With ObjSendMail.Configuration.Fields
        .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2  'Send the message using the network (SMTP over the network).
        .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.office365.com"
        .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
        .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True  'Use SSL for the connection (True or False)
        .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

        ' Since our server requires authentication we need these lines
        .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1  'basic (clear-text) authentication
        .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = Username
        .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = Password

        .Update
    End With

    'End remote SMTP server configuration section==

    ObjSendMail.To = MailTo
    ObjSendMail.Subject = Subject
    ObjSendMail.From = MailFrom
    ObjSendMail.AddAttachment FileName
    'ObjSendMail.HTMLBody = Message
    ObjSendMail.TextBody = Message

    ObjSendMail.Send
    MsgBox "Email Sent"
    Set ObjSendMail = Nothing
    Exit Sub
ErrMsg:
    MsgBox Err.Number & Err.Description
End Sub
I can probably setup a test account on our 365 email for your developers if you need.
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6813
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: Problem with Outlook Office 365 email

Post by Paul - Tracker Supp »

Thanks for the report RMan

I spoke to one of the devs about this and they are investigating. We will post here the results.

regards
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Post Reply