Forums
This topic is locked
Help with jmail to CDONTS conversion
Posted 22 Apr 2007 21:17:28
1
has voted
22 Apr 2007 21:17:28 Micke Bergman posted:
Hi, I need help to convert jmail code to CDONTS because the server people refuse to install jmail...Can someone please help me to convert this jmail code to CDONTS:
<pre id=code><font face=courier size=2 id=code>
<% Set jmail = Server.CreateObject("jmail.Message"
jmail.From = " "
jmail.FromName = "Mr Clean"
jmail.AddRecipient " "
jmail.Subject = "Sign up for newsletter"
jmail.HTMLBody = "<font face='arial' size='5'><b> Sign up - New members</b></font><font face='arial' size='2'><br><br>" _
& "<font color='#000099'><b>Company:</b></font> " & request.form("company" & "<br />" _
& "<font color='#000099'><b>Address: </b></font>" & request.form("address" & "<br />" _
& "<font color='#000099'><b>Zip code: </b></font>" & request.form("zip" & "<br />" _
& "<font color='#000099'><b>City: </b></font>" & request.form("city" & "<br />" _
& "<font color='#000099'><b>Contact person: </b></font>" & request.form("contactfullname" & "<br />" _
& "<font color='#000099'><b>Telephone: </b></font>" & request.form("contacttele" & "<br />" _
& "<font color='#000099'><b>E-mail: </b></font>" & request.form("contactemail" & "<br />" _
& "<font color='#000099'><b>Message: </b></font>" & request.form("therest" & "<br />" _
& "</font>"
if not jmail.Send("mail.hymans.se" ) then
Response.write "FEL <pre>" & msg.log & "</pre>"
else
Response.write "Message sent succesfully!"
end if
set jmail=nothing
response.redirect "thanks.html" )
%>
</font id=code></pre id=code>
Any kind of help is greatly appreciated!
/Micke
Replies
Replied 17 May 2007 19:37:19
17 May 2007 19:37:19 dave blohm replied:
here ya go...let me know if you have any questions
<pre id=code><font face=courier size=2 id=code><%
if request.form <> "" then
Set jmail = createobject("CDONTS.NewMail"
with jmail
.BodyFormat = 0
.MailFormat = 0
.To = ' ::::: YOUR "TO" ADDRESS GOES HERE ::::: '
.From = " <Mr Clean>"
.Subject = "Sign up for newsletter"
.Body = "<font face='arial' size='5'><b> Sign up - New members</b></font><font face='arial' size='2'><br><br>"
_& "<font color='#000099'><b>Company:</b></font> " & request.form("company" & "<br />"
_& "<font color='#000099'><b>Address: </b></font>" & request.form("address" & "<br />"
_& "<font color='#000099'><b>Zip code: </b></font>" & request.form("zip" & "<br />"
_& "<font color='#000099'><b>City: </b></font>" & request.form("city" & "<br />"
_& "<font color='#000099'><b>Contact person: </b></font>" & request.form("contactfullname" & "<br />"
_& "<font color='#000099'><b>Telephone: </b></font>" & request.form("contacttele" & "<br />" _& "<font color='#000099'><b>E-mail: </b></font>" & request.form("contactemail" & "<br />"
_& "<font color='#000099'><b>Message: </b></font>" & request.form("therest" & "<br />" _& "</font>"
end with
jmail.send
jmail = nothing
response.write "Message sent succesfully!"
response.redirect "thanks.html"
else %>
<form>heres where i would put my mail form, but that's just me</form>
<% end if%></font id=code></pre id=code>
Hope this helps.
- Doc
Progress is made by the discontent.
<pre id=code><font face=courier size=2 id=code><%
if request.form <> "" then
Set jmail = createobject("CDONTS.NewMail"
with jmail
.BodyFormat = 0
.MailFormat = 0
.To = ' ::::: YOUR "TO" ADDRESS GOES HERE ::::: '
.From = " <Mr Clean>"
.Subject = "Sign up for newsletter"
.Body = "<font face='arial' size='5'><b> Sign up - New members</b></font><font face='arial' size='2'><br><br>"
_& "<font color='#000099'><b>Company:</b></font> " & request.form("company" & "<br />"
_& "<font color='#000099'><b>Address: </b></font>" & request.form("address" & "<br />"
_& "<font color='#000099'><b>Zip code: </b></font>" & request.form("zip" & "<br />"
_& "<font color='#000099'><b>City: </b></font>" & request.form("city" & "<br />"
_& "<font color='#000099'><b>Contact person: </b></font>" & request.form("contactfullname" & "<br />"
_& "<font color='#000099'><b>Telephone: </b></font>" & request.form("contacttele" & "<br />" _& "<font color='#000099'><b>E-mail: </b></font>" & request.form("contactemail" & "<br />"
_& "<font color='#000099'><b>Message: </b></font>" & request.form("therest" & "<br />" _& "</font>"
end with
jmail.send
jmail = nothing
response.write "Message sent succesfully!"
response.redirect "thanks.html"
else %>
<form>heres where i would put my mail form, but that's just me</form>
<% end if%></font id=code></pre id=code>
Hope this helps.
- Doc
Progress is made by the discontent.