String aa = this.dbpath.replace ("//"). Replace ("//", "); mailmessage mailobj = new mailmessage (); // set mail send and receive address mailobj.From = Wthorse@gmail.com //mailobj.to =wthorse@gmail.com mailobj.cc=wthorse@gmail.com
Mailobj.Subject = "Title"; Mailobj.Body = "Text";
// HTML format mail mailobj.bodyFormat = mailformat.html;
// Set to advanced priority mailobj.priority = mailpriority.high;
/ / Add an attachment for email // Note: Here we have created a MaiLattachment object Add an attachment to Mailobj.attachments.Add (New MaiLattachment (aa));
// Send a mail smtpmail.smtpserver = mail server IP address using the SMTPMail object; SMTPMAIL.SEND (Mailobj); this.listbox1.items.add ("Database Send Success ... / R / N");
Also refer to the mail server configuration