Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_cdo thread: email


Message #1 by "Pappas Nikos" <pappas@c...> on Fri, 23 Mar 2001 13:46:19 +0200
I am using the following code to send email with asp.

It is working fine but the name appears with ""

Dear "Nikos" etc etc

How can I avoid the "" and have just Nikos ?(I am using a string for this)

Thanks for the help you provide in this forum

Best regards

Nikos Pappas

There's my code



<%

dim Email

  dim lastName

  lastName = "Nikos"

  Email="somestring form the visitor"

  Dim objMail

  Set objMail = Server.CreateObject("CDONTS.NewMail")



     objMail.From = "sales@m..."

     objMail.Subject = "Confirmation mail"

     objMail.To = "" & Email

     objMail.Body = "Dear " & vbcrlf&_

     "" & lastName & vbcrlf&_

     "Thank you for supporting my site.com" & vbcrlf&_

     "Your request is published." & vbcrlf&_

     "Please don't forget to inform us if your posted add is not valid any

more. " & vbcrlf&_

     "Best regards"& vbcrlf&_

     "mysite.com sales"

     objMail.Send



 Response.write("Mail was Sent")



  set objMail = nothing

%>



Message #2 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Fri, 23 Mar 2001 13:18:34 -0000
objMail.Body = "Dear " & vbcrlf&_

     "" & lastName & vbcrlf&_



will produce



Dear

"Nikos



get rid of the "", and probably the first vbcrlf



-----Original Message-----

From: Pappas Nikos [mailto:pappas@c...]

Sent: Friday, March 23, 2001 8:18 PM

To: ASP CDO

Subject: [asp_cdo] email





I am using the following code to send email with asp.

It is working fine but the name appears with ""

Dear "Nikos" etc etc

How can I avoid the "" and have just Nikos ?(I am using a string for this)

Thanks for the help you provide in this forum

Best regards

Nikos Pappas

There's my code



<%

dim Email

  dim lastName

  lastName = "Nikos"

  Email="somestring form the visitor"

  Dim objMail

  Set objMail = Server.CreateObject("CDONTS.NewMail")



     objMail.From = "sales@m..."

     objMail.Subject = "Confirmation mail"

     objMail.To = "" & Email

     objMail.Body = "Dear " & vbcrlf&_

     "" & lastName & vbcrlf&_

     "Thank you for supporting my site.com" & vbcrlf&_

     "Your request is published." & vbcrlf&_

     "Please don't forget to inform us if your posted add is not valid any

more. " & vbcrlf&_

     "Best regards"& vbcrlf&_

     "mysite.com sales"

     objMail.Send



 Response.write("Mail was Sent")



  set objMail = nothing

%>

________________________________________________________________________

Scottish Enterprise Network

http://www.scottish-enterprise.com

Message #3 by "Wally Burfine" <oopconsultant@h...> on Fri, 23 Mar 2001 15:04:03 -0000
Your code doesn't reflect what you are showing us. The code would produce 

something like



Dear

Nicos

...





Regards,

Wally



>From: "Pappas Nikos" <pappas@c...>

>Reply-To: "ASP CDO" <asp_cdo@p...>

>To: "ASP CDO" <asp_cdo@p...>

>Subject: [asp_cdo] email

>Date: Fri, 23 Mar 2001 12:17:56 -0800

>

>I am using the following code to send email with asp.

>It is working fine but the name appears with ""

>Dear "Nikos" etc etc

>How can I avoid the "" and have just Nikos ?(I am using a string for this)

>Thanks for the help you provide in this forum

>Best regards

>Nikos Pappas

>There's my code

>

><%

>dim Email

>   dim lastName

>   lastName = "Nikos"

>   Email="somestring form the visitor"

>   Dim objMail

>   Set objMail = Server.CreateObject("CDONTS.NewMail")

>

>      objMail.From = "sales@m..."

>      objMail.Subject = "Confirmation mail"

>      objMail.To = "" & Email

>      objMail.Body = "Dear " & vbcrlf&_

>      "" & lastName & vbcrlf&_

>      "Thank you for supporting my site.com" & vbcrlf&_

>      "Your request is published." & vbcrlf&_

>      "Please don't forget to inform us if your posted add is not valid any

>more. " & vbcrlf&_

>      "Best regards"& vbcrlf&_

>      "mysite.com sales"

>      objMail.Send

>

>  Response.write("Mail was Sent")

>

>   set objMail = nothing

>%>

>

>
Message #4 by "Pappas Nikos" <pappas@c...> on Fri, 23 Mar 2001 22:22:06 +0200
Hi

Thanks for the help guys

The code was finally fine but there was a mistake in the form that was

posting the info

to the mail asp

Thanks for the help you always provide

All the best

Nikos Pappas



-----Original Message-----

From: Wally Burfine [mailto:oopconsultant@h...]

Sent: Friday, March 23, 2001 5:04 PM

To: ASP CDO

Subject: [asp_cdo] Re: email





Your code doesn't reflect what you are showing us. The code would produce

something like



Dear

Nicos

...





Regards,

Wally



>From: "Pappas Nikos" <pappas@c...>

>Reply-To: "ASP CDO" <asp_cdo@p...>

>To: "ASP CDO" <asp_cdo@p...>

>Subject: [asp_cdo] email

>Date: Fri, 23 Mar 2001 12:17:56 -0800

>

>I am using the following code to send email with asp.

>It is working fine but the name appears with ""

>Dear "Nikos" etc etc

>How can I avoid the "" and have just Nikos ?(I am using a string for this)

>Thanks for the help you provide in this forum

>Best regards

>Nikos Pappas

>There's my code

>

><%

>dim Email

>   dim lastName

>   lastName = "Nikos"

>   Email="somestring form the visitor"

>   Dim objMail

>   Set objMail = Server.CreateObject("CDONTS.NewMail")

>

>      objMail.From = "sales@m..."

>      objMail.Subject = "Confirmation mail"

>      objMail.To = "" & Email

>      objMail.Body = "Dear " & vbcrlf&_

>      "" & lastName & vbcrlf&_

>      "Thank you for supporting my site.com" & vbcrlf&_

>      "Your request is published." & vbcrlf&_

>      "Please don't forget to inform us if your posted add is not valid any

>more. " & vbcrlf&_

>      "Best regards"& vbcrlf&_

>      "mysite.com sales"

>      objMail.Send

>

>  Response.write("Mail was Sent")

>

>   set objMail = nothing

>%>




  Return to Index