Hi all,
I currently have an form that has an input of an email address to send to. What I wish to try and do is change the "To" field so that it only requires a name to be put in with the email domain automatically inserted. So basically, I wish someone to put in JSMITH and then the To email address would work out to be JSMITH@domain.com
This is the code that i have used -
If (cStr(Request("Submit")) <> "") Then
Dim objCDO
Set objCDO = Server.CreateObject("cdonts.NewMail")
objCDO.From = cStr(Request("varFrom")) 'Senders Email Address
objCDO.To = cStr(Request("varTo")) 'Recipient Email Address
objCDO.CC = cStr(Request("varCC")) 'Carbon Copy Address
objCDO.Subject = cStr(Request("varSubject")) 'Email Subject
objCDO.Body = cStr(Request("varMessage")) 'Email Message
objCDO.Send() 'Send email
Set objCDO = Nothing 'Clean up your objects!!!
'Response.Redirect("thanks.asp") 'use this to redirect page after delivery
Response.Write("Message Delivered") 'default response
End If
%>
Thank you for any assistance...
I currently have an form that has an input of an email address to send to. What I wish to try and do is change the "To" field so that it only requires a name to be put in with the email domain automatically inserted. So basically, I wish someone to put in JSMITH and then the To email address would work out to be JSMITH@domain.com
This is the code that i have used -
If (cStr(Request("Submit")) <> "") Then
Dim objCDO
Set objCDO = Server.CreateObject("cdonts.NewMail")
objCDO.From = cStr(Request("varFrom")) 'Senders Email Address
objCDO.To = cStr(Request("varTo")) 'Recipient Email Address
objCDO.CC = cStr(Request("varCC")) 'Carbon Copy Address
objCDO.Subject = cStr(Request("varSubject")) 'Email Subject
objCDO.Body = cStr(Request("varMessage")) 'Email Message
objCDO.Send() 'Send email
Set objCDO = Nothing 'Clean up your objects!!!
'Response.Redirect("thanks.asp") 'use this to redirect page after delivery
Response.Write("Message Delivered") 'default response
End If
%>
Thank you for any assistance...