Smart Mailer ASP Support Product Page

This topic was archived

Css support..!?

Reported 07 Feb 2005 14:47:38
1
has this problem
07 Feb 2005 14:47:38 Dave  posted:
Dear smartmailer asp developer , i purchased the smartmailer and also the ad html editor and what i trying to establish is online newletter system which has to be pretty simple to build for anyone of us , the idea is to send online mails " on the fly of course" not with html file , to 500 users that inside the database now to the problem :

i have set the adv html editor and then set the smart mailer asp to send the content of the adv(editor1) to multiple users that in the database , how can i include the css inside the header of the email ...? i did try to include it in the body but it's not working .......

smart mailer code :
<%
' Smart Mailer 1.0.5
' Send on submit of form form2
' Use progress green_mailprogress.htm
' dimentions 300, 100
if Request.ServerVariables("REQUEST_METHOD" = "POST" then
Server.ScriptTimeout = 300
Set sm1 = new SmartMailer
sm1.checkVersion "1.05"
sm1.contentCharset = "windows-1255"
Session.CodePage = sm1.getCodepage()
sm1.smtpSetup "", "", "", ""
sm1.pickup = ""
sm1.component = "cdo"
sm1.tmpFolder = ""
sm1.embedImages = false
sm1.progressBar = "green_mailprogress.htm"
sm1.ignore_errors = true
sm1.useQueue = false
sm1.setFrom admins.Fields.Item("AdminU".Value, admins.Fields.Item("Email".Value
Set sm1.toRecord = Customers
sm1.toRecordName = "FirstName"
sm1.toRecordEmail = "Email"
sm1.total_mail = sm1.getTotalRecords(Customers)
while not sm1.toRecord.EOF
sm1.setTo sm1.toRecord.Fields.Item(sm1.toRecordName).Value, sm1.toRecord.Fields.Item(sm1.toRecordEmail).Value
sm1.Subject = "" & (cStr(Request.Form("Subject")) & ""
' using static for body
sm1.setBody_Static_html "<style type=""text/css"">" & vbCRLF & "<!--" & vbCRLF & ".normal {" & vbCRLF & " font-family: Verdana, Arial, Helvetica, sans-serif;" & vbCRLF & " font-size: 10px;" & vbCRLF & " font-style: normal;" & vbCRLF & " line-height: normal;" & vbCRLF & " font-weight: normal;" & vbCRLF & " font-variant: normal;" & vbCRLF & " text-transform: none;" & vbCRLF & " color: #333333;" & vbCRLF & " text-decoration: none;" & vbCRLF & "}" & vbCRLF & ".normaltitle {" & vbCRLF & " font-family: Verdana, Arial, Helvetica, sans-serif;" & vbCRLF & " font-size: 11px;" & vbCRLF & " font-style: normal;" & vbCRLF & " line-height: normal;" & vbCRLF & " font-weight: normal;" & vbCRLF & " font-variant: normal;" & vbCRLF & " text-transform: none;" & vbCRLF & " color: #333333;" & vbCRLF & " text-decoration: none;" & vbCRLF & "}" & vbCRLF & ".title {" & vbCRLF & " font-family: Verdana, Arial, Helvetica, sans-serif;" & vbCRLF & " font-size: 12px;" & vbCRLF & " color: #333333;" & vbCRLF & " text-decoration: none;" & vbCRLF & " font-weight: normal;" & vbCRLF & " text-transform: none;" & vbCRLF & "}" & vbCRLF & ".title_mail {" & vbCRLF & " font-family: Verdana, Arial, Helvetica, sans-serif;" & vbCRLF & " font-size: 11px;" & vbCRLF & " color: #333333;" & vbCRLF & " text-decoration: none;" & vbCRLF & " font-weight: normal;" & vbCRLF & " text-transform: none;" & vbCRLF & "}" & vbCRLF & "" & vbCRLF & ".title_w {" & vbCRLF & " font-family: Verdana, Arial, Helvetica, sans-serif;" & vbCRLF & " font-size: 12px;" & vbCRLF & " color: #333333;" & vbCRLF & " text-decoration: none;" & vbCRLF & " font-weight: normal;" & vbCRLF & " text-transform: none;" & vbCRLF & "}" & vbCRLF & "" & vbCRLF & ".ctext {" & vbCRLF & " font-family: Verdana, Arial, Helvetica, sans-serif;" & vbCRLF & " font-size: 10px;" & vbCRLF & " text-transform: none;" & vbCRLF & " color: #333333;" & vbCRLF & " font-weight: normal;" & vbCRLF & " text-decoration: none;" & vbCRLF & "" & vbCRLF & "" & vbCRLF & "}" & vbCRLF & "" & vbCRLF & ".table10px {" & vbCRLF & " font-family: Verdana, Arial, Helvetica, sans-serif;" & vbCRLF & " font-size: 10px;" & vbCRLF & " line-height: 10px;" & vbCRLF & " text-decoration: none;" & vbCRLF & "}" & vbCRLF & "" & vbCRLF & ".normalCopy {" & vbCRLF & " font-family: Verdana, Arial, Helvetica, sans-serif;" & vbCRLF & " font-size: 10px;" & vbCRLF & " font-style: normal;" & vbCRLF & " line-height: normal;" & vbCRLF & " font-weight: normal;" & vbCRLF & " font-variant: normal;" & vbCRLF & " text-transform: none;" & vbCRLF & " color: #333333;" & vbCRLF & " text-decoration: none;" & vbCRLF & " background-color: #FFFFFF;" & vbCRLF & " border: 1px solid #CCCCCC;" & vbCRLF & "}" & vbCRLF & "" & vbCRLF & ".whitemenu {" & vbCRLF & "" & vbCRLF & " font-family: Verdana, Arial, Helvetica, sans-serif;" & vbCRLF & " font-size: 9px;" & vbCRLF & " font-style: normal;" & vbCRLF & " line-height: normal;" & vbCRLF & " font-weight: normal;" & vbCRLF & " font-variant: normal;" & vbCRLF & " text-transform: none;" & vbCRLF & " color: #FFFFFF;" & vbCRLF & " text-decoration: none;" & vbCRLF & "}" & vbCRLF & "" & vbCRLF & ".menu {" & vbCRLF & "" & vbCRLF & "" & vbCRLF & " font-family: Verdana, Arial, Helvetica, sans-serif;" & vbCRLF & " font-size: 10px;" & vbCRLF & " font-style: normal;" & vbCRLF & " line-height: normal;" & vbCRLF & " font-weight: normal;" & vbCRLF & " font-variant: normal;" & vbCRLF & " text-transform: none;" & vbCRLF & " color: #FFFFFF;" & vbCRLF & " text-decoration: none;" & vbCRLF & "}" & vbCRLF & "" & vbCRLF & ".pinknormal{" & vbCRLF & "" & vbCRLF & " font-family: Verdana, Arial, Helvetica, sans-serif;" & vbCRLF & " font-size: 10px;" & vbCRLF & " font-style: normal;" & vbCRLF & " line-height: normal;" & vbCRLF & " font-weight: normal;" & vbCRLF & " font-variant: normal;" & vbCRLF & " text-transform: none;" & vbCRLF & " color: #333333;" & vbCRLF & " text-decoration: none;" & vbCRLF & " background-color: #FFE8F3;" & vbCRLF & " border: 1px solid #CCCCCC;" & vbCRLF & "}" & vbCRLF & "" & vbCRLF & ".pinkbold {" & vbCRLF & "" & vbCRLF & " font-family: Verdana, Arial, Helvetica, sans-serif;" & vbCRLF & " font-size: 10px;" & vbCRLF & " font-style: normal;" & vbCRLF & " line-height: normal;" & vbCRLF & " font-weight: bold;" & vbCRLF & " font-variant: normal;" & vbCRLF & " text-transform: none;" & vbCRLF & " color: #333333;" & vbCRLF & " text-decoration: none;" & vbCRLF & " background-color: #FFE8F3;" & vbCRLF & " border: 1px solid #000000;" & vbCRLF & "}" & vbCRLF & ".normalmail {" & vbCRLF & " font-family: Verdana, Arial, Helvetica, sans-serif;" & vbCRLF & " font-size: 10px;" & vbCRLF & " font-style: normal;" & vbCRLF & " line-height: normal;" & vbCRLF & " font-weight: normal;" & vbCRLF & " font-variant: normal;" & vbCRLF & " text-transform: none;" & vbCRLF & " color: #333333;" & vbCRLF & " text-decoration: none;" & vbCRLF & " background-color: #EAF9FF;" & vbCRLF & " border: 1px solid #82D7FF;" & vbCRLF & "}" & vbCRLF & ".normalnews {" & vbCRLF & " font-family: Verdana, Arial, Helvetica, sans-serif;" & vbCRLF & " font-size: 10px;" & vbCRLF & " font-style: normal;" & vbCRLF & " line-height: normal;" & vbCRLF & " font-weight: normal;" & vbCRLF & " font-variant: normal;" & vbCRLF & " text-transform: none;" & vbCRLF & " color: #333333;" & vbCRLF & " text-decoration: none;" & vbCRLF & " background-color: #FFFFFF;" & vbCRLF & " border: 1px solid #6699FF;" & vbCRLF & "}" & vbCRLF & ".normalgreen {" & vbCRLF & " font-family: Verdana, Arial, Helvetica, sans-serif;" & vbCRLF & " font-size: 10px;" & vbCRLF & " font-style: normal;" & vbCRLF & " line-height: normal;" & vbCRLF & " font-weight: normal;" & vbCRLF & " font-variant: normal;" & vbCRLF & " text-transform: none;" & vbCRLF & " color: #333333;" & vbCRLF & " text-decoration: none;" & vbCRLF & " background-color: #EAF4F4;" & vbCRLF & " border: 1px solid #91C8C8;" & vbCRLF & "}" & vbCRLF & "" & vbCRLF & "-->" & vbCRLF & "</style>" & vbCRLF & "" & (Request.Form("hiddenField") & ""
' Attachments none
sm1.sendMail "multiple"
Customers.MoveNext()
Wend
sm1.done()
Response.Redirect "Done.asp"
end if
SM_mailAction = getMailAction()
%>


please help me asap.
thanks for your time by advanced
David


Edited by - sky^net on 07 Feb 2005 14:53:56

Replies

Replied 12 May 2005 17:13:51
12 May 2005 17:13:51 Andre Bender replied:
Just create a template page and call it for within smartmailer.
Replied 27 May 2005 14:20:34
27 May 2005 14:20:34 Patrick Woldberg replied:
when using such a large body it is indeed better to use a template, you can pass along the parameters using the querystring

--------------------------------------------------
Patrick Woldberg
Web Developer at Dynamic Zones
Administrator at DMXzone.com, FLzone.net, FWzone.net and DNzone.com
--------------------------------------------------
Replied 19 Dec 2005 00:04:27
19 Dec 2005 00:04:27 Helle M replied:
Hi
I'm using an online template, but the CSS is not in the email the user receive? So I have the problem - using a template

Helle <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Replied 06 Mar 2006 13:14:38
06 Mar 2006 13:14:38 Hans Gelok replied:
Hi Helle,

put your CSS not before but after the body-tag!

Reply to this topic