When sending email with VB how can you use another email address instead of the default from email address? Please
let me know.
Thanks,
Laura
Printable View
When sending email with VB how can you use another email address instead of the default from email address? Please
let me know.
Thanks,
Laura
Robert Smith has some good info on his page (http://www.smithvoice.com/vbfun.htm). Look under "Getting the Word Out." Hope his example helps you!
you can use shell with the microsoft outlook exe
like
shell(c:/winnt/outlook.exe, blah..)
I will post the code when I have a chance
Thanks Mongo and Sanford101! You tips did not help me. What I wanted to do is to replace the default "FROM:" email address with another email address.
Thanks,
Laura
Uhm.. this really isn't going to answer your question but may change your need for this.. it is possible to change the "from" address but you will still be able to tell that it didn't come from that person. Someone who really doesn't look at it may be fooled but anyone who looks at the header will know exactly who it came from. You can telnet into a some mail relay servers and actually compose an email and fire it off with a bogus from address but the header will actually say the real from address. If your goal is for it to be impossible to tell who it really came from, it's not going to happen.
Swing and a miss, huh? Otay, howse 'bout...
Set myOlApp = CreateObject("Outlook.Application")
'Creates a new MailItem form
Set myItem = myOlApp.CreateItem(olMailItem)
'Set the "From" field
myItem.SentOnBehalfOfName = "Mongo"