Welcome! Log In Create A New Profile

Advanced

Send emails via Outlook

Posted by David Egan 
David Egan
Send emails via Outlook
August 15, 2008 07:28AM
Is there a trick to getting this to work? If I connect directly (no Outlook) using EmailStartSMTPSession everything works fine. However if I use EmailStartOutlookSession first, followed by EmailStartSMTPSession it locks up at the EmailStartSMTPSession line. If my understanding of the Help files is correct both of these lines are required. I tried omitting the StartSMTP line which got me past that point but it then doesn't know what account to use for sending the email so crashes at that point.

Thanks

David
DerekT
Re: Send emails via Outlook
August 15, 2008 09:58AM
David

EmailStartOutlookSession works fine for me, with or without the profile name entered.
If I do not enter a profile name it displays a list of avaialble profiles for selection.
I do not use the EmailStartSMTPSession function, indeed I cannot find in the Help were it says that both are required.

From Help..........
If this parameter is an empty string (""):
if several profiles are defined on the current computer, EmailStartOutlookSession displays a window containing all the profiles among which the user can choose his own profile.
if a single profile is defined on the current computer, EmailStartOutlookSession automatically selects this profile.


OK, just tried a quick cut&paste from the help...

SessionID = EmailStartOutlookSession("")
// Read the first contact
ContactFirst(SessionID)
// Add the contacts to a list
WHILE mContact.Out = False
Trace(mContact.Name + TAB + mContact.FirstName)
//ListAdd(ContactList, mContact.Name + TAB + mContact.FirstName)
ContactNext(SessionID)
END

IF SessionID <> 0 THEN
CloseSession(SessionID)
END

Worked OK!!!!!

I am using this on my pc and not on a dedicated mail server so maybe your mileage will vary.

HTH

DerekT
David Egan
Re: Send emails via Outlook
August 15, 2008 10:46AM
Thanks Derek
That worked so I fiddled around, reread the help etc. and have got it working as it should. I now get the security message from Outlook but at least I know how to overcome that.

Cheers

David
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: