private void BnOk_Click (object sender, System.EventArgs e) {string strTo = txtEmail.Text; string strFrom = "username@domain.com"; string strSubject = "Your friend for a job for you"; string strBody = " test b> ";
MailMessage Message = New MailMessage ();
// SMTPMAIL.SMTPSERVER = "?.?.?.?"; // message.fields.add ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); // Basic Authentication ////////////schemas.microsoft.com/cdo/configuration/sendusername ", username"); // set your username here //// message.fields.add ("http : //schemas.microsoft.com/cdo/configuration/sendpassword "," password "); // set your password here smtpmail.smtpserver ="?.?.?.? "; message.to = strto; message.from = strfrom; message.subject = strsubject; message.body = strbody;
SMTPMAIL.SEND (Message);
// jmail // jmail.speedmailerclass message = new jmail.speedmailerclass (); // message.sendmail (strfrom, strs, strsubject, strbody, "");
// cdonts // cdonts.newmailclass n = new cdonts.newmailclass (); // n.bodyFormat = 0; // n.mailformat = 0; // n.send (strfrom, strs, strsubject, strbody, 1); / * CDONTS component text format: bodyformat = 0 HTML mode bodyFormat = 1 plain text * /
// cdosys // cdo.MessageClass M = new cdo.MessageClass (); // m.to = straw; // m.from = strfrom; // m.subject = strsubject; // m.TextBody = strBody; / / M.send ();
BNOK.Text = "Send success"; bnok.enabled = false;
}