• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

SmtpMail html mail problem

ComCool

n00b
Joined
Jan 31, 2006
Messages
12
I have a problem with a newsletter script, it sendt out html code, but the mail is the code itself.

Looks like this:
ind_industry?X-Mailer: JMail.NET 1.0.0 Standard Version by Dimac
MIME-Version: 1.0
From: MAKE Consulting <info@make-consulting.com>
Content-Type: text/html; charset=-ascii
Date: Wed, 25 Jul 2007 12:42:28 +0200

<SPAN lang=EN-GB style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"><SPAN
lang=EN-GB style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">&nbsp;<SPAN
lang=EN-GB style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify;
tab-stops: 378.0pt"><SPAN lang=EN-GB style="FONT-SIZE: 9pt; FONT-FAMILY:
Arial">On June 26th 2007 French industrial Group Alstom SA agreed on an
acquisition plan to acquire Spanish WTG vendor Ecotècnia for €
350 million. The deal is supposed to be finalized in December 2007 and
both companies are currently awaiting Ecotècnia to become a listed
company.<?xml:namespace prefix = o ns =
"urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify;
tab-stops: 378.0pt"><SPAN lang=EN-GB style="FONT-SIZE: 9pt; FONT-FAMILY:
Arial"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify;
tab-stops: 378.0pt"><SPAN lang=EN-GB style="FONT-SIZE: 9pt; FONT-FAMILY:
Arial">Alstom is already well positioned within green energy sources as
hydro and steam, Ecotècnia marks Alstom’s entry into an
industry which is growing with the increased focus on clean energy
globally.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify;
tab-stops: 378.0pt"><SPAN lang=EN-GB style="FONT-SIZE: 9pt; FONT-FAMILY:
Arial"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify;
tab-stops: 378.0pt"><SPAN lang=EN-GB style="FONT-SIZE: 9pt; FONT-FAMILY:
Arial">While Ecotècnia is well positioned on especially the Spanish
market they have not experienced any significant growth in terms of
installed capacity through the past three years. The new ownership will
provide the opportunity for this to happen.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify;
tab-stops: 378.0pt"><SPAN lang=EN-GB style="FONT-SIZE: 9pt; FONT-FAMILY:
Arial"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify;
tab-stops: 378.0pt"><SPAN lang=EN-GB style="FONT-SIZE: 9pt; FONT-FAMILY:
Arial; mso-ansi-language: EN-GB; mso-fareast-font-family: 'Times New
Roman'; mso-fareast-language: DA; mso-bidi-language: AR-SA">The entry into
a global organization provides an opportunity for Ecotècnia to expand
its activities into new and attractive markets such as North America and
<?xml:namespace prefix = st1 ns =
"urn:schemas-microsoft-com:eek:ffice:smarttags" /><st1:country-region
w:st="on"><st1:place w:st="on">China</st1:place></st1:country-region>.
Ecotècnia’s successful 1.6MW is well suited to meet the demand
for medium-sized MW WTGs in these markets and with the booming US and
Chinese markets, Ecotècnia could soon get a foothold in these markets
given Alstom’s current position.</SPAN></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify;
tab-stops: 378.0pt"><SPAN lang=EN-GB style="FONT-SIZE: 9pt; FONT-FAMILY:
Arial; mso-ansi-language: EN-GB; mso-fareast-font-family: 'Times New
Roman'; mso-fareast-language: DA; mso-bidi-language:
AR-SA"></SPAN></SPAN><SPAN lang=EN-GB style="FONT-SIZE: 9pt; FONT-FAMILY:
Arial; mso-ansi-language: EN-GB; mso-fareast-font-family: 'Times New
Roman'; mso-fareast-language: DA; mso-bidi-language:
AR-SA"></SPAN>&nbsp;</P>
<DIV class=O style="mso-line-spacing: '80 0 0'; mso-char-wrap: 1;
mso-kinsoku-overflow: 1" v:shape="_x0000_s1026"><SPAN lang=EN-GB
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-ansi-language: EN-GB;
mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: DA;
mso-bidi-language: AR-SA">For more information, please visit&nbsp;<A
title=http://make-consulting.dkhttp://make-consulting.dk/admin/filer/07012
4.pdf
HREF="http://make-consulting.dk/admin/filer/070724.pdf">http://www.make-co
nsulting.comhttp://make-consulting.dk/admin/filer/070724.pdf</A>.</SPAN></
DIV>
<DIV class=O style="mso-line-spacing: '80 0 0'; mso-char-wrap: 1;
mso-kinsoku-overflow: 1" v:shape="_x0000_s1026"><SPAN lang=EN-GB
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-ansi-language: EN-GB;
mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: DA;
mso-bidi-language: AR-SA"></SPAN><SPAN lang=EN-GB style="FONT-SIZE: 10pt;
FONT-FAMILY: Arial"><o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Kind
regards<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoAutoSig style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="FONT-SIZE: 9pt; COLOR: #999999; FONT-FAMILY: Arial;
mso-ansi-language: EN-GB; mso-no-proof: yes">MAKE
Consulting<o:p></o:p></SPAN></P>
<P class=MsoAutoSig style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="FONT-SIZE: 9pt; COLOR: #999999; FONT-FAMILY: Arial;
mso-ansi-language: EN-GB; mso-no-proof: yes">DK-8270
Højbjerg<o:p></o:p></SPAN></P>
<P class=MsoAutoSig style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="FONT-SIZE: 9pt; COLOR: #999999; FONT-FAMILY: Arial;
mso-ansi-language: EN-GB; mso-no-proof: yes">T: +45 7026
6628<o:p></o:p></SPAN></P>
<P class=MsoAutoSig style="MARGIN: 0cm 0cm 0pt"><SPAN lang=DE
style="FONT-SIZE: 9pt; COLOR: #999999; FONT-FAMILY: Arial;
mso-ansi-language: DE; mso-no-proof: yes">M:+45 2929
5052<o:p></o:p></SPAN></P>
<P class=MsoAutoSig style="MARGIN: 0cm 0cm 0pt"><SPAN lang=DE
style="FONT-SIZE: 9pt; COLOR: #999999; FONT-FAMILY: Arial;
mso-ansi-language: DE; mso-no-proof: yes">E:
mbk@make-consulting.com<o:p></o:p></SPAN></P>
<P class=MsoAutoSig style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="FONT-SIZE: 9pt; COLOR: #999999; FONT-FAMILY: Arial;
mso-ansi-language: EN-GB; mso-no-proof: yes">W:
www.make-consulting.com</SPAN><SPAN lang=EN-GB style="FONT-SIZE: 10pt;
COLOR: #999999; FONT-FAMILY: Arial; mso-ansi-language: EN-GB;
mso-no-proof: yes"> <o:p></o:p></SPAN></P>

The code that creates the mail looks like this:

MailMessage msg1 = new MailMessage();

msg1.From = "infos@make-consulting.com";
msg1.To = this.inp_overskrift.Text;
msg1.Subject = hentData()[0]["subject"].ToString();
msg1.Body = hentData()[0]["html"].ToString();
msg1.BodyFormat = MailFormat.Html;
msg1.Priority = MailPriority.Normal;
SmtpMail.SmtpServer = "smtp.nmnet.dk";
SmtpMail.Send(msg1);
 
There's a lot of un-needed code there, but have you tried setting the appropriate mime-types? What client are you using to check email? Does it have the ability to display HTML view?

SQMail with linux, and some pop clients are set by default not to view HTML, or atleast have an option to toggle between the two.
 
Back
Top