Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDO not sending body

Status
Not open for further replies.

penguinspeaks

Technical User
Nov 13, 2002
234
US
I have CDO mail set up. It is sending the email just fine. The issue is it does not have the body. The email is blank in other words.

Please take a look at this and let me know. WEird thing is, this comes from another website that have fully working send email so I do not understand.

Here is my code

Code:
<!--#include virtual="/inc/connection.asp"-->
<%


id2 =  request.form("id")

Dim ObjSendMail
Set ObjSendMail = CreateObject("CDO.Message") 
     
'This section provides the configuration information for the remote SMTP server.
     
ObjSendMail.Configuration.Fields.Item ("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendusing")[/URL] = 2 'Send the message using the network (SMTP over the network).
ObjSendMail.Configuration.Fields.Item ("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserver")[/URL] ="mail.liquitronics.com"
ObjSendMail.Configuration.Fields.Item ("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserverport")[/URL] = 25 
ObjSendMail.Configuration.Fields.Item ("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpusessl")[/URL] = False 'Use SSL for the connection (True or False)
ObjSendMail.Configuration.Fields.Item ("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")[/URL] = 60
     
' If your server requires outgoing authentication uncomment the lines bleow and use a valid email address and password.
ObjSendMail.Configuration.Fields.Item ("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpauthenticate")[/URL] = 1 'basic (clear-text) authentication
ObjSendMail.Configuration.Fields.Item ("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendusername")[/URL] ="jeff@liquitronics.com"
ObjSendMail.Configuration.Fields.Item ("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendpassword")[/URL] ="mypw"
     
ObjSendMail.Configuration.Fields.Update
     
'End remote SMTP server configuration section==
'*******************************************************************************************************************************

	set con1 = conn.execute("select * from orders where confirm_ = "&id2&"")
vmethod = con1.fields.item("method_").value
		if vmethod = "email_" then
		vmethod = "Email containing a USPS shipping label will be sent"
		elseif vmethod = "kit_" then
		vmethod = "A pre-paid USPS shipping kit will be shipping to the above address"
		end if		
   vpayment = con1.fields.item("payment_").value
   		if vpayment = "paypal" then
   		vpayment = "Your payment for this device will be issue through PayPal after the device has been received and graded."
   		elseif vpayment = "check" then
   		vpayment = "A Check will be issued and mailed soon after the device has been received and graded."
   		end if
   v_con = con1.fields.item("brand_").value
   v_mod1 = con1.fields.item("mod1_").value
   v_email = con1.fields.item("email_").value
   v_dev = con1.fields.item("device_id").value
   v_val = FormatCurrency((con1.fields.item("value_").value),2)
   vmeth = con1.fields.item("method_").value
   vfirst = con1.fields.item("first_").value
   vlast = con1.fields.item("last_").value
   vaddress1 = con1.fields.item("address1_").value
   vaddress2 = con1.fields.item("address2_").value
   vcity = con1.fields.item("city_").value
   vstate = con1.fields.item("state_").value
   vzip = con1.fields.item("zip_").value
   vphone = con1.fields.item("phone_").value
   		vphonea = Left(vphone,3)
   		vphoneb = Mid(vphone,4,3)
   		vphonec = right(vphone,4)
   vcon = con1.fields.item("confirm_").value
   				if v_mod1 = "phone" then
						set info2 = conn.execute("select * from pricing where id = "&v_dev&"")
							if v_val = "low" then
								vprice = FormatCurrency((info2.fields.item("usdamaged_").value),2)
							elseif v_val = "med" then
	    						vprice = FormatCurrency((info2.fields.item("usused").value),2)
							elseif v_val = "high" then
	    						vprice = FormatCurrency((info2.fields.item("usflawless").value),2)
	    	
    						end if
    								v_brand = info2.fields.item("brand_").value
    								v_varrier = info2.fields.item("carrier_").value
    								v_model = info2.fields.item("model_").value
    								vimage = info2.fields.item("image_").value

    								vmod1 = "Phone"
							elseif v_mod1 = "tab" then
								set info2 = conn.execute("select * from pricing_tablet where id = "&v_dev&"")
									if v_val = "low" then
										vprice = FormatCurrency((info2.fields.item("usdamaged_").value),2)
									elseif v_val = "med" then
	    								vprice = FormatCurrency((info2.fields.item("usused_").value),2)
									elseif v_val = "high" then
	    								vprice = FormatCurrency((info2.fields.item("usflawless_").value),2)
    								end if
    									v_brand = info2.fields.item("brand_").value
    								v_varrier = info2.fields.item("carrier_").value
    								v_model = info2.fields.item("model_").value

    									vimage = info2.fields.item("image_").value

    									vmod1 = "Tablet"
					elseif v_mod1 = "game" then
								set info2 = conn.execute("select * from pricing_gaming where id = "&v_dev&"")
									if v_val = "low" then
										vprice = FormatCurrency((info2.fields.item("usdamaged_").value),2)
									elseif v_val = "med" then
	    								vprice = FormatCurrency((info2.fields.item("usused").value),2)
									elseif v_val = "high" then
	    								vprice = FormatCurrency((info2.fields.item("usflawless").value),2)
    								end if
    								v_brand = info2.fields.item("brand_").value
    								v_varrier = info2.fields.item("carrier_").value
    								v_model = info2.fields.item("model_").value

    								vimage = info2.fields.item("image_").value

    	
    								vmod1 = "Gaming Console"
    

							end if

     
ObjSendMail.To = "jeff@liquitronics.com"

ObjSendMail.Subject = "Liquitech Receiving Confirmation # "&vcon
ObjSendMail.From = "support@liquitronics.com"


strSEND = "<p> <br></p>" & _ 
	"<p> <br></p>" & _
        "<p>This is a notification to let you know that your device has been received.</p>" & _ 
        "<p> </p>" & _ 
        "<p> </p>" & _ 
        "<p>We have received</p>" & _ 
        "<p>"&v_brand&" "&v_model&" for "&v_varrier&"</p>" & _
        "<p><img src=""[URL unfurl="true"]http://liquitronics.com/images/"&vimage&".jpg""><br></p>"[/URL] & _ 
        "<p>Upon inspection during the processing stage, the phone will be graded</p>" & _
		"<p>and it will move to the payment stage once processing is complete.</p>" & _
        "<p>Your order number is #</p> "&vcon & _ 
        "<p> <br></p>" & _ 
        "<p>Please use this number as a reference if you should need to contact us.</p>" & _
        "<p> <br></p>" & _
        "<p>Shipping Information:</p>" & _
        "<p> <br></p>" & _
        
ObjSendMail.HTMLBody = strSEND
     
ObjSendMail.Send
     
Set ObjSendMail = Nothing 

response.redirect "checkout.asp"
%>

I can even set the body as
Code:
strSEND = "<p> Hello</p>" & _
And the email goes out but the body is blank.

Any ideas??
 
What happens if you send a text body as well?

Does the receiving client support HTML messages?

What do the email headers show?

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
TEXTbody does the very same. Yes the client receives HTML messages. I am using my email as the testing email. I receive 100's of html emails a day on that account.

I am not sure what you mean by headers. The subject line is correct. Just the body missing.


And thank you for replying.
 
Okay, instead of "sending" the message have you printed the output to screen (use a <textarea> or a <pre> for HTML code)

email headers

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Thanks. I will try that. If it isn't one thing it is another

Now aspupload isn't working. I have unregistered the dll, and re-registered it. Still getting errors.
WH can't things just work this week, geez lol
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top