how to send email

  • Thread starter Thread starter TBoon
  • Start date Start date
Hi easy simple method is to use early binding referencing
outlook

Dim oOutL As New Outlook.Application
Dim oMail As Outlook.MailItem
oMail = oOutL.CreateItem(Outlook.OlItemType.olMailItem)
oMail.UnRead = True
oMail.To = "(e-mail address removed)"
oMail.Subject = "hello"
oMail.send()


but better with late binding as its client independant

Hope this helps

Adam Zuneid Issat
 
Excuse me for jumping in but I have a follow up question on this technique.
When I use this method, Outlook jumps up with a dialog telling me that "A
program is trying to automatically send email on your behalf...."
Is there a way to tell outlook in 'advance' that this program is allowed to
do this?
Also, Outlook uses the default email account as the from but I can not see a
way to select a different from account - know of a way to do that?

TIA
 
I once saw how to send an email via Microsoft's Exchange Server via VB.net
2005. Where do I find the info for that. I do not know what to look under
on MSDN.
Tony K.
 
I once saw how to send an email via Microsoft's Exchange Server via VB.net
2005. Where do I find the info for that. I do not know what to look under
on MSDN.
Tony K.

You should just be able to set the SmtpClient class to work with
Exchange, and then send the email message through that.

Thanks,

Seth Rowe [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top