vb.net - how to connect visual basic .net with microsoft exchange with free libraries posible? -
are there free libraries vb.net use connecting ms exchange server? have found paid ones i'd rather not invest, couln't find free libraries.. tried using java protocol layer mapi wouldn't work
what trying accomplish?
i've had no trouble sending mail via exchange account using regular smtp client
public shared sub sendemail(byval sfromaddress string, _ byval stoaddress string, _ byval ssmtpaddress string, _ byval susername string, _ byval spassword string, _ byval sorderno string, _ byval surl string, _ byval iport integer) try dim client new smtpclient(ssmtpaddress, iport) client.usedefaultcredentials = false client.credentials = new system.net.networkcredential(susername, spassword) client.enablessl = true dim mail new mailmessage mail.to.add(stoaddress) mail.from = new mailaddress(sfromaddress) mail.subject = getsubject(sorderno) mail.isbodyhtml = true mail.body = getbody(sorderno, surl) client.send(mail) catch ex exception messagebox.show("error sending e-mail!") end try end sub
if want have more meaningful interaction, know can accomplish lot using microsoft.office.interop.outlook
. check out http://msdn.microsoft.com/en-us/library/ms268893(vs.80).aspx more information.
Comments
Post a Comment