質問: "this is my test email body"; client.send(mail);
回答: ただこれを試す必要があります。string smtpaddress = "smtp.gmail.com"; int portnumber = 587; bool enablessl = true; string emailfrom = "companyemail"; string password = "password"; string emailto = "your email"; string subject = "hello!"; string body = "hello, mr."; mailmessage mail = new mailmessage(); mail.from = new mailaddress(emailfrom); mail.to.add(emailto); mail.subject = subject; mail.body = body; mail.isbodyhtml = true; using (smtpclient smtp = new smtpclient(smtpaddress, portnumber)) { smtp.credentials = new networkcredential(emailfrom, password); smtp.enablessl = enablessl; smtp.send(mail); }