O6.1.2 - Unlisted SMTP Error code

Chris Hughes ataddata at bigpond.net.au
Thu Dec 22 01:15:24 EST 2016

This use to work for me.

Do method $GetAutomationOb ("MSMAPI.MAPISession") Returns iMapiSess
Do iMapiSess.$createobject()

Do iMapiSess.$signon Returns LvError
Do iMapiSess.$sessionid Returns LvSessionNo
Do iMAPIMess.$createobject() Returns LvError
Do iMAPIMess.$sessionid.$assign(LvSessionNo)
Do iMAPIMess.$compose()
Do iMAPIMess.$recipaddress.$assign(pToLst)
Do iMAPIMess.$recipdisplayname.$assign(pName)
Do iMAPIMess.$msgsubject.$assign(pSubject)
Do iMAPIMess.$msgnotext.$assign(pBody)
If len(pType)>0
Do pAttachLst.$line.$assign(1)
Do iMAPIMess.$attachmentindex.$assign(1)
Do iMAPIMess.$attachmentname.$assign(1)
Do iMAPIMess.$attachmentpathname.$assign(1)
Do iMAPIMess.$attachmentposition.$assign(1)
Do iMAPIMess.$attachmenttype.$assign(1)
Do pAttachLst.$line.$assign(pAttachLst.$line+1)
Until pAttachLst.$line>pAttachLst.$linecount
End If
Do iMAPIMess.$send.$assign(0)     ;; Send imediately 8= display first 
then send
Do iMapiSess.$signoff
Do iMAPIMess.$release
;  Do iMapiSess.$release

Do LvExternalsList.$cols.$add('ExternalName',kCharacter,kSimplechar,100) 
;; Create a list with a column for names of automation objects
Do $root.$extobjects.Automation 
;; Build a list of all Automation objects who
Do LvExternalsList.$sort($ref.ExternalName,kTrue)     ;; Put the most 
current version of the Object at the top of the list.
Do LvTempRow.$cols.$add('Object',kObject,con(".Automation 
Library.Automation\",LvExternalsList.1.ExternalName))     ;; Create an 
instance of the automation object inside a row variable
Quit method LvTempRow.Object     ;; Return the object to the calling 

Chris Hughes

------ Original Message ------
From: "Bill Richards" <whizzybill at gmail.com>
To: "OmnisDev List - English" <omnisdev-en at lists.omnis-dev.com>
Sent: Thursday, 22 Dec, 2016 At 10:47 AM
Subject: O6.1.2 - Unlisted SMTP Error code

Dear all

I am trying to do an SMTPSend via Outlook. Some of the info has been 
sanitised, but shouldn’t change the sense of what I am doing.

I accept that I am a complete child when it comes to this, but I am 
trying to make pretty small steps and hoped that keeping it simple would 
make it easier to debug, if there is such a thing with comms.

However, in best traditions, the error code returned ‘-1034’ is not 
actually listed in the error codes in the Omnis Help.

Anyone got some suggestions as to where I am going wrong?

The SMTPSend line is…

('outlook.office365.com','FV_USERNAME’,’fromme at myemail.com’,’Test 
Subject','Test email',,,'Bill',,,,FV_USERNAME,FV_PASSWORD,kTrue)

(FV_USERNAME is a properly formatted login name into my outlook account 
and is hence the ‘from’ email as well)

Many thanks

- Bill
Manage your list subscriptions at http://lists.omnis-dev.com

More information about the omnisdev-en mailing list