G
Guest
I have created a button in a form which i would like to send an email to the
address in an email field on the same form when clicked.
In my hunt to find code i have found this
email.to = "recipient address"
email.From = "SenderAddress"
email.Body = "MessageText"
email.Subject = "SubjectText"
email.BodyFormat = Web.Mail.MailFormat.Text
System.Web.Mail.SmtpMail.SmtpServer = "SmtpServerName"
System.Web.Mail.SmtpMail.Send (email)
I assume my email.to will be [formname].[emailaddress] {or maybe not}
but i cannot think what to put in for email.from as i would just like it to
use the account of the person logged in at the time.
If somebody could tell me if i am, firstly on the correct path and secondly,
how to complete the code; it would be much appreciated.
address in an email field on the same form when clicked.
In my hunt to find code i have found this
email.to = "recipient address"
email.From = "SenderAddress"
email.Body = "MessageText"
email.Subject = "SubjectText"
email.BodyFormat = Web.Mail.MailFormat.Text
System.Web.Mail.SmtpMail.SmtpServer = "SmtpServerName"
System.Web.Mail.SmtpMail.Send (email)
I assume my email.to will be [formname].[emailaddress] {or maybe not}
but i cannot think what to put in for email.from as i would just like it to
use the account of the person logged in at the time.
If somebody could tell me if i am, firstly on the correct path and secondly,
how to complete the code; it would be much appreciated.