Outlook Express 6 and VB6
I am using Outlook Express 6.0 and I use the Mapi Controls in VB6 to send email via OE6 like this:
Code:
mapMess.RecipDisplayName = Text3.Text
mapMess.RecipAddress = Text5.Text
mapMess.MsgSubject = "Customer Newsletter"
The problem is this always uses my OE6 default email address however I want to use my "Email-to-SMS" service for which I need to specify my other email address (not the default) as the "From" email address.
How do I specify a different "From" address so that it does not use my default OE6 email address but my other email address instead?
Re: Outlook Express 6 and VB6
You cant specify a different From address unless its an actual valid account. This prevents email fraud and spammers.
Re: Outlook Express 6 and VB6
Quote:
You cant specify a different From address unless its an actual valid account. This prevents email fraud and spammers.
Thanks for the reply.
Yes, I wish to specify a valid email account not a phony account.
Please advise should anyone know how to specify my other valid email account (not my default email account).
Re: Outlook Express 6 and VB6
You have to go into Outlook Express and specxify which will be your default address. Then when you send with MAPI it will pickup the default.
Re: Outlook Express 6 and VB6
Oh I see.
So there is not way to select the account from which to send the mail directly from VB6?
Re: Outlook Express 6 and VB6
You could monitor the registry and see how OE specifies the default account in the registry. Then change account defaults via code.
Re: Outlook Express 6 and VB6
Thanks RobDog888, sounds like that may be for more advanced users :D I will make an effort to learn about it though.
Appreciate the help :)
Re: Outlook Express 6 and VB6
The registry isnt too hard but the user will need permissions to read /write to the key. Search the forums for RegOpenKey or RegQueryInfoKey and you will find some example code.
Re: Outlook Express 6 and VB6
I get shivers working with the registry in real time :D
But thanks for the info. Will make sure I know what I am doing before I dig too deep in the registry.