vb.net - Visual Basic email system bcc mails -
i making visual basic email software software send attachment files , messages want send mails many companies adding field want add bcc , cc mail system include don't have idea how code ..if 1 have sense of give me idea .... or other way add multiples mails system attachment of doc cv file .... need know add filter not add other format file send .but need know how add bcc blind carbon copy system in vb , cc carbon copy system..
imports system.net imports system.net.mail private mpmessage mailmessage = nothing private mpsmtpsvr smtpclient = nothing '------------------------------------------------------------------------ '-> send message '------------------------------------------------------------------------ mailerhost = "addrss-of-your-emailer-host-server" mpmessage = new system.net.mail.mailmessage() mpmessage.body = "message body text goes here" if trim(sendernamevalue) <> "" mpmessage.from = new system.net.mail.mailaddress("senderemail@hotmail.com", sendernamevalue) mpmessage.sender = new system.net.mail.mailaddress("senderemail@hotmail.com", sendernamevalue) else mpmessage.from = new system.net.mail.mailaddress("senderemail@hotmail.com", "name_unspecified") mpmessage.sender = new system.net.mail.mailaddress("senderemail@hotmail.com", "name_unspecified") end if mpmessage.priority = system.net.mail.mailpriority.high mpmessage.subject = "[web-reponse] - correspondence via website response form." mpmessage.to.add(trim("recipient@yahoo.com")) mpmessage.cc.add(trim("secretary@yahoo.com")) mpmessage.bcc.add(trim("manager@yahoo.com")) try mpsmtpsvr.send(mpmessage) sendstandardcommunicae = true catch ex net.mail.smtpexception returnerrorid = eeml_networkerrorsendingemail returnerrortext = "a network error occurred whilst trying send message, please check details syntax errors , try again later.<br />if error occurs consistently please contact site administrator or use alternative method of contact.<br /><br />" returnerrortext = returnerrortext & "extra information:" & ex.message end try
Comments
Post a Comment