Hi Shona,
The syntax would be
objCDOMail.From = "Jon Spivey <(E-Mail Removed)>"
so you'd probably have something like
objCDOMail.From = FP_SavedFields("Name") & " " & FP_SavedFields("LastName")
& " <" & FP_SavedFields("LastName") & ">"
Although you might want to move away from CDONTS as it's no longer
supported, so when you upgrade to xp pro and/or your host upgrades to
windows server 2003 your code will no longer run. So you might want to take
this oppurtunity to migrate your code over to cdo, see this article
http://www.aspfaq.com/show.asp?id=2026
--
Cheers,
Jon
Microsoft MVP - FP
"Shona" <(E-Mail Removed)> wrote in message
news:bv609b$f3k$(E-Mail Removed)...
> Hi
>
> I have the following script on my confirmation page. It all works fine
and
> when I receive a mail it says it From what ever has been typed in the
field
> Name. However what I would also like it to put is the persons surname as
> well with a space in between.
>
>
> <%
> Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
> objCDOMail.To = "(E-Mail Removed)"
> objCDOMail.From = FP_SavedFields("Name")
> objCDOMail.Subject = FP_SavedFields("Results")
> strBody = strBody & "Name: " & FP_SavedFields("Name") & VbCrLf
> strBody = strBody & "Surname: " & FP_SavedFields("Surname") & VbCrLf
> objCDOMail.Body = strBody
> objCDOMail.BodyFormat = 1
> objCDOMail.MailFormat = 1
> objCDOMail.Send
> Set objCDOMail = Nothing
> %>
>
> Hope someone has the answer for me.
>
> Cheers Shona
>
>