Hosting News & Commentary Hosting News & Commentary Hosting News & Commentary
My Top 3

Previously I was using this code for sending mail - this was working fine

:thumbs: Code:


<% 'send mail code using AspMail 4.x
if = "GRANT" then
decision = "GRANTED"
elseif = "REJECT" then

decision = "REJECTED"
elseif = "PENDING" then
decision = "KEPT PENDING"
end if

Dim strTo
Dim strFrom
Dim strSubject
Dim strBody ‘Strings for recipient, subject, body

strTo = rscheck.Fields ("emp_mailid")
strFrom = rsemp.Fields ("emp_mailid")
strFrom = />strsubject = "Your Leave Application"

Set Mailer =
Mailer.ContentType = "text/html"
Mailer.FromName = session("login")
Mailer.FromAddress = strFrom
Mailer.RemoteHost = "localhost"
Mailer.AddRecipient "Authority", strTo
Mailer.Subject = strSubject
Mailer.ReplyTo = rscheck.Fields ("autho1_mail")
Mailer.BodyText = " Subject : Decision on your Leave Application
Your leave application for Application Id ‘" & Request.QueryString ("applid") & " is " & decision & " "

Mailer.BodyText = "Here’s some info"

%>

<%
if Mailer.SendMail then %>
<% Response.Write "Mail sent..." %>
<% 'response.write strbody %>
<% else
Response.Write "Mail send failure. Error was " & Mailer.Response
Response.Write "Approval "
end if
%>


since Are web hosting package has cdosys component - we are converting from aspmail 4.x to cdosys code syntax.

Now I am using cdosys code - This doesn’t seem to be working -
Even I am trying to use my database syntax in this cdosys code - can u help me out in this issue.

:) Code:


<%
‘Dimension variables
‘Dim objcdosysCon , objcdosysmail, Body
Dim myCon , mymail, Body
‘Create the e-mail server object
Set mymail = />Set myCon = server.CreateObject />’Out going SMTP server
myCon.Fields.Update

‘Update the cdosys Configuration
Set mymail.Configuration = myCon

mymail.From = />mymail.To = />’mymail.To = rscheck.Fields ("autho1_mail")
mymail.Subject = "Your Subject"

Body = "Dear " + "User"+ ","
Body = Body + " "
Body = Body + " "

Body = Body + "

Subject : Leave Application asp"> Click here to Approve or disapprove now "
Body = Body + "…

"
Body = Body + " "

mymail.HTMLBody = Body
mymail.Send
‘Close the server mail object
Set mymail = Nothing
Set myCon = Nothing
Response.Write(" Thanks U ")

%>


Pls response to this issue.

Thanks & Regards
Santosh Pandere
Sky Industries Ltd.

  1. No user reviews yet.


Leave a Reply