c# - Unity 3D - User is filling in an survey and then automatically send an email -
in unity 3d want title says: user filling in survey , automatically send email. use unity 3d. have c# script want user of game fill in.
script:
using system.net; using system.net.mail; using unityengine; public class sendmail : monobehaviour { public string sender = "me@mymailaccount.com"; public string receiver = "me@mymailaccount.com"; public string smtppassword = "mysmtppassword"; public string smtphost = "mail.mymailacount.com"; // use initialization private void start() { using (var mail = new mailmessage { = new mailaddress(sender), subject = "test subject", body = "hello there!" }) { mail.to.add(receiver); var smtpserver = new smtpclient(smtphost) { port = 25, credentials = (icredentialsbyhost)new networkcredential(sender, smtppassword) }; servicepointmanager.servercertificatevalidationcallback = delegate { return true; }; smtpserver.send(mail); } } }
"i need house, have these planks."
that's how "question" sounds. no offense meant, nobody implement feature you. you'll need flesh out question bit more. as can yourself, identify doesn't work, ask specific questions.
so has nice how ask.
Comments
Post a Comment