Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP6 Outlook Accounts 2

Status
Not open for further replies.

eric43

Programmer
Apr 29, 2005
94
AU
I have three accounts in Outlook and wish to use a specific one for messages from VFP using PostCast.

I am using the following code with some passed parameters

Code:
		o=createobject("outlook.application")
		oitem=o.createitem(0)
		oitem.subject=alltrim(bodymsg1)

		oitem.to=sendingto

		oitem.body=alltrim(bodymsg2)

		oitem.send

		o=.null.

Many thanks

Eric
 
I was asking how to nominate a specific Outlook account using a method in the above code.

Thanks

ERIC
 

I believe that Outlook is not as flexible as some methods. It will most likely only take that account set be default. You would most likely have to use eith MAPI (which allows you to specify a profile) or CDO which can allow any sender and is not account specific.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 

Eric,

A client had the same problem a year or so ago. As far as I remember, we couldn't find a way of doing it programmatically. I believe you can change various fields in the message, such as the reply-to address, but not the identity of the sender.

I agree with Mike Gagnon that other methods are more flexible. It's not too difficult to talk directly to an SMTP server. There are several utilities and DLLs available to do that. For example, you might take a look at Blatt.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top