This is weird



i have a method :

Public Function SendMailMessage(ByVal Recipient As String, ByVal Body As
String, ByVal From As String, Optional ByVal BCC As String = "", Optional
ByVal CC As String = "", Optional ByVal Subject As String = "", Optional
ByVal IsBodyHtml As Boolean = True) As Boolean
Try
Dim mMailMessage As New MailMessage()
mMailMessage.From = New MailAddress(From)
mMailMessage.To.Add(New MailAddress(Recipient))

If Not String.IsNullOrEmpty(BCC) Then
mMailMessage.Bcc.Add(New MailAddress(BCC))
End If

If Not String.IsNullOrEmpty(CC) Then
mMailMessage.CC.Add(New MailAddress(CC))
End If

mMailMessage.Subject = Subject
mMailMessage.Body = Body

mMailMessage.IsBodyHtml = IsBodyHtml
mMailMessage.Priority = MailPriority.Normal

Dim mSmtpClient As New SmtpClient(My.Settings.SMTPHost,
My.Settings.SMTPPort)
mSmtpClient.Send(mMailMessage)
Catch ex As Exception
Return False
End Try
Return True
End Function

wich works perfect on a local system when sending e-mail in HTML format
however when the method is run in a server process the e-mails that i
receive loose there HTML markup


so short :
Local nice formated html message , remote running on unattended sewrver
process but method in the same dll with all the same settings mail arrives
as HTML source code

anyone an idea ??? what i am missing

here is the full source of the server process ( wich is started by a
service with reflection )

MAIL
Imports System.Text.RegularExpressions
Imports System.Net.Mail
Public Class EMail
Public Function ValidEMail(ByVal email As String) As Boolean
'ruwe controle dmv regex of een mail adres wel geldig kan zijn
Dim reg As New Regex("^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}
\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)")
Return reg.IsMatch(email)
End Function
Public Function SendMailMessage(ByVal Recipient As String, ByVal Body As
String, ByVal From As String, Optional ByVal BCC As String = "", Optional
ByVal CC As String = "", Optional ByVal Subject As String = "", Optional
ByVal IsBodyHtml As Boolean = True) As Boolean
Try
Dim mMailMessage As New MailMessage()
mMailMessage.From = New MailAddress(From)
mMailMessage.To.Add(New MailAddress(Recipient))

If Not String.IsNullOrEmpty(BCC) Then
mMailMessage.Bcc.Add(New MailAddress(BCC))
End If

If Not String.IsNullOrEmpty(CC) Then
mMailMessage.CC.Add(New MailAddress(CC))
End If

mMailMessage.Subject = Subject
mMailMessage.Body = Body

mMailMessage.IsBodyHtml = IsBodyHtml
mMailMessage.Priority = MailPriority.Normal

Dim mSmtpClient As New SmtpClient(My.Settings.SMTPHost,
My.Settings.SMTPPort)
mSmtpClient.Send(mMailMessage)
Catch ex As Exception
Return False
End Try
Return True
End Function
End Class


Method that uses Mail class

Private Sub CreateXML()
SortByRadioMeter()
Dim _HTMWORowS As String = String.Empty
Dim sBodyHTML As String = My.Settings.HTMMail
sBodyHTML = sBodyHTML.Replace("#var:gebn#", Me.ProgNaam)
sBodyHTML = sBodyHTML.Replace("#var:start#", Date.Now.ToString)
Dim iCount As Integer = 0
Try
For Each Me._WONr In ParVals
If CancellProcess Then Exit Sub 'wanneer ontvangen dan
stoppen met verwerken
Try
Using clsRep As New clsReport(_WONr, Me.GebruikersNaam,
Me.ProgNaam, Me.PrinterId)
'events binden aan handler methods
AddHandler clsRep.ErrorOccured, AddressOf clsRepError
AddHandler clsRep.eSuccess, AddressOf clsRepeSuccess
'start genereren rapport
clsRep.CreateRep()
iCount += 1
_HTMWORowS = String.Concat(_HTMWORowS,
My.Settings.HTMWoRow.Replace("#var:wo#", _WONr.ToString), Environment.NewLine)
End Using
Catch ex As Exception
MyBase.RaiseError("W.O." & Environment.NewLine &
Environment.NewLine & ex.ToString & Environment.NewLine & " Values :
ObjectNr= " & _WONr.ToString & " User started =" & Me.GebruikersNaam)
End Try
Next
Catch ex As Exception
MyBase.RaiseProcessCancell("W.O. Print " & Environment.NewLine &
ex.ToString & Environment.NewLine & Environment.NewLine & " Values :
ObjectNr= " & _WONr.ToString & " User started =" & Me.GebruikersNaam)
Finally
sBodyHTML = sBodyHTML.Replace("#var:start#", Date.Now.ToString)
sBodyHTML = sBodyHTML.Replace("#var:body#", _HTMWORowS)
Try
Dim email As New ista.EMail
If email.ValidEMail(My.Settings.SendWoMail) Then

email.SendMailMessage(My.Settings.SendWoMail, sBodyHTML,
"NePros@istanederland.nl", My.Settings.SendWoMailBCC,
My.Settings.SendWoMailCC, String.Concat("W.O. Print ",
Date.Now.ToShortDateString, " aantal=", iCount.ToString), True)
End If
Catch ex As Exception
MyBase.RaiseError(ex.ToString)
End Try
End Try
End Sub


:-(

Michel

Re: strange problem with smtpmail by Cor

Cor
Wed Mar 12 07:33:12 CDT 2008

Michel,

You most probably make Herfried happy.

Try (UrlEncode (From))

etc

:-)

Cor





"Michel Posseth [MCP]" <MichelPossethMCP@discussions.microsoft.com> schreef
in bericht news:B94734F4-EDF8-43CD-966A-0469F41C520F@microsoft.com...
> This is weird
>
>
>
> i have a method :
>
> Public Function SendMailMessage(ByVal Recipient As String, ByVal Body As
> String, ByVal From As String, Optional ByVal BCC As String = "", Optional
> ByVal CC As String = "", Optional ByVal Subject As String = "", Optional
> ByVal IsBodyHtml As Boolean = True) As Boolean
> Try
> Dim mMailMessage As New MailMessage()
> mMailMessage.From = New MailAddress(From)
> mMailMessage.To.Add(New MailAddress(Recipient))
>
> If Not String.IsNullOrEmpty(BCC) Then
> mMailMessage.Bcc.Add(New MailAddress(BCC))
> End If
>
> If Not String.IsNullOrEmpty(CC) Then
> mMailMessage.CC.Add(New MailAddress(CC))
> End If
>
> mMailMessage.Subject = Subject
> mMailMessage.Body = Body
>
> mMailMessage.IsBodyHtml = IsBodyHtml
> mMailMessage.Priority = MailPriority.Normal
>
> Dim mSmtpClient As New SmtpClient(My.Settings.SMTPHost,
> My.Settings.SMTPPort)
> mSmtpClient.Send(mMailMessage)
> Catch ex As Exception
> Return False
> End Try
> Return True
> End Function
>
> wich works perfect on a local system when sending e-mail in HTML format
> however when the method is run in a server process the e-mails that i
> receive loose there HTML markup
>
>
> so short :
> Local nice formated html message , remote running on unattended sewrver
> process but method in the same dll with all the same settings mail
> arrives
> as HTML source code
>
> anyone an idea ??? what i am missing
>
> here is the full source of the server process ( wich is started by a
> service with reflection )
>
> MAIL
> Imports System.Text.RegularExpressions
> Imports System.Net.Mail
> Public Class EMail
> Public Function ValidEMail(ByVal email As String) As Boolean
> 'ruwe controle dmv regex of een mail adres wel geldig kan zijn
> Dim reg As New Regex("^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}
> \.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)")
> Return reg.IsMatch(email)
> End Function
> Public Function SendMailMessage(ByVal Recipient As String, ByVal Body
> As
> String, ByVal From As String, Optional ByVal BCC As String = "", Optional
> ByVal CC As String = "", Optional ByVal Subject As String = "", Optional
> ByVal IsBodyHtml As Boolean = True) As Boolean
> Try
> Dim mMailMessage As New MailMessage()
> mMailMessage.From = New MailAddress(From)
> mMailMessage.To.Add(New MailAddress(Recipient))
>
> If Not String.IsNullOrEmpty(BCC) Then
> mMailMessage.Bcc.Add(New MailAddress(BCC))
> End If
>
> If Not String.IsNullOrEmpty(CC) Then
> mMailMessage.CC.Add(New MailAddress(CC))
> End If
>
> mMailMessage.Subject = Subject
> mMailMessage.Body = Body
>
> mMailMessage.IsBodyHtml = IsBodyHtml
> mMailMessage.Priority = MailPriority.Normal
>
> Dim mSmtpClient As New SmtpClient(My.Settings.SMTPHost,
> My.Settings.SMTPPort)
> mSmtpClient.Send(mMailMessage)
> Catch ex As Exception
> Return False
> End Try
> Return True
> End Function
> End Class
>
>
> Method that uses Mail class
>
> Private Sub CreateXML()
> SortByRadioMeter()
> Dim _HTMWORowS As String = String.Empty
> Dim sBodyHTML As String = My.Settings.HTMMail
> sBodyHTML = sBodyHTML.Replace("#var:gebn#", Me.ProgNaam)
> sBodyHTML = sBodyHTML.Replace("#var:start#", Date.Now.ToString)
> Dim iCount As Integer = 0
> Try
> For Each Me._WONr In ParVals
> If CancellProcess Then Exit Sub 'wanneer ontvangen dan
> stoppen met verwerken
> Try
> Using clsRep As New clsReport(_WONr, Me.GebruikersNaam,
> Me.ProgNaam, Me.PrinterId)
> 'events binden aan handler methods
> AddHandler clsRep.ErrorOccured, AddressOf
> clsRepError
> AddHandler clsRep.eSuccess, AddressOf
> clsRepeSuccess
> 'start genereren rapport
> clsRep.CreateRep()
> iCount += 1
> _HTMWORowS = String.Concat(_HTMWORowS,
> My.Settings.HTMWoRow.Replace("#var:wo#", _WONr.ToString),
> Environment.NewLine)
> End Using
> Catch ex As Exception
> MyBase.RaiseError("W.O." & Environment.NewLine &
> Environment.NewLine & ex.ToString & Environment.NewLine & " Values :
> ObjectNr= " & _WONr.ToString & " User started =" & Me.GebruikersNaam)
> End Try
> Next
> Catch ex As Exception
> MyBase.RaiseProcessCancell("W.O. Print " & Environment.NewLine
> &
> ex.ToString & Environment.NewLine & Environment.NewLine & " Values :
> ObjectNr= " & _WONr.ToString & " User started =" & Me.GebruikersNaam)
> Finally
> sBodyHTML = sBodyHTML.Replace("#var:start#", Date.Now.ToString)
> sBodyHTML = sBodyHTML.Replace("#var:body#", _HTMWORowS)
> Try
> Dim email As New ista.EMail
> If email.ValidEMail(My.Settings.SendWoMail) Then
>
> email.SendMailMessage(My.Settings.SendWoMail,
> sBodyHTML,
> "NePros@istanederland.nl", My.Settings.SendWoMailBCC,
> My.Settings.SendWoMailCC, String.Concat("W.O. Print ",
> Date.Now.ToShortDateString, " aantal=", iCount.ToString), True)
> End If
> Catch ex As Exception
> MyBase.RaiseError(ex.ToString)
> End Try
> End Try
> End Sub
>
>
> :-(
>
> Michel
>
>
>
>
>
>
>
>
>
>



Re: strange problem with smtpmail by MichelPossethMCP

MichelPossethMCP
Wed Mar 12 07:49:03 CDT 2008

i narrowed it a bit down

Note that remote server is a BLS server ( not a web server ) but a windows
service wich starts dll`s through reflection

If i copy a test project ( exe ) to this server and run in the same user
context as the service is running , everything works as expected , but if
the service invokes the method (through interfacing and reflection ) the
e-mails are send but arrive as HTML source instead of formatted HTML

So the problem must be in the combination Reflection and SMTP class

( for the time beeing i send my mails from this service now as plain text ,
wich works fine )

but i wonder why it wil not work with HTML formatting

Michel








"Cor Ligthert [MVP]" wrote:

> Michel,
>
> You most probably make Herfried happy.
>
> Try (UrlEncode (From))
>
> etc
>
> :-)
>
> Cor
>
>
>
>
>
> "Michel Posseth [MCP]" <MichelPossethMCP@discussions.microsoft.com> schreef
> in bericht news:B94734F4-EDF8-43CD-966A-0469F41C520F@microsoft.com...
> > This is weird
> >
> >
> >
> > i have a method :
> >
> > Public Function SendMailMessage(ByVal Recipient As String, ByVal Body As
> > String, ByVal From As String, Optional ByVal BCC As String = "", Optional
> > ByVal CC As String = "", Optional ByVal Subject As String = "", Optional
> > ByVal IsBodyHtml As Boolean = True) As Boolean
> > Try
> > Dim mMailMessage As New MailMessage()
> > mMailMessage.From = New MailAddress(From)
> > mMailMessage.To.Add(New MailAddress(Recipient))
> >
> > If Not String.IsNullOrEmpty(BCC) Then
> > mMailMessage.Bcc.Add(New MailAddress(BCC))
> > End If
> >
> > If Not String.IsNullOrEmpty(CC) Then
> > mMailMessage.CC.Add(New MailAddress(CC))
> > End If
> >
> > mMailMessage.Subject = Subject
> > mMailMessage.Body = Body
> >
> > mMailMessage.IsBodyHtml = IsBodyHtml
> > mMailMessage.Priority = MailPriority.Normal
> >
> > Dim mSmtpClient As New SmtpClient(My.Settings.SMTPHost,
> > My.Settings.SMTPPort)
> > mSmtpClient.Send(mMailMessage)
> > Catch ex As Exception
> > Return False
> > End Try
> > Return True
> > End Function
> >
> > wich works perfect on a local system when sending e-mail in HTML format
> > however when the method is run in a server process the e-mails that i
> > receive loose there HTML markup
> >
> >
> > so short :
> > Local nice formated html message , remote running on unattended sewrver
> > process but method in the same dll with all the same settings mail
> > arrives
> > as HTML source code
> >
> > anyone an idea ??? what i am missing
> >
> > here is the full source of the server process ( wich is started by a
> > service with reflection )
> >
> > MAIL
> > Imports System.Text.RegularExpressions
> > Imports System.Net.Mail
> > Public Class EMail
> > Public Function ValidEMail(ByVal email As String) As Boolean
> > 'ruwe controle dmv regex of een mail adres wel geldig kan zijn
> > Dim reg As New Regex("^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}
> > \.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)")
> > Return reg.IsMatch(email)
> > End Function
> > Public Function SendMailMessage(ByVal Recipient As String, ByVal Body
> > As
> > String, ByVal From As String, Optional ByVal BCC As String = "", Optional
> > ByVal CC As String = "", Optional ByVal Subject As String = "", Optional
> > ByVal IsBodyHtml As Boolean = True) As Boolean
> > Try
> > Dim mMailMessage As New MailMessage()
> > mMailMessage.From = New MailAddress(From)
> > mMailMessage.To.Add(New MailAddress(Recipient))
> >
> > If Not String.IsNullOrEmpty(BCC) Then
> > mMailMessage.Bcc.Add(New MailAddress(BCC))
> > End If
> >
> > If Not String.IsNullOrEmpty(CC) Then
> > mMailMessage.CC.Add(New MailAddress(CC))
> > End If
> >
> > mMailMessage.Subject = Subject
> > mMailMessage.Body = Body
> >
> > mMailMessage.IsBodyHtml = IsBodyHtml
> > mMailMessage.Priority = MailPriority.Normal
> >
> > Dim mSmtpClient As New SmtpClient(My.Settings.SMTPHost,
> > My.Settings.SMTPPort)
> > mSmtpClient.Send(mMailMessage)
> > Catch ex As Exception
> > Return False
> > End Try
> > Return True
> > End Function
> > End Class
> >
> >
> > Method that uses Mail class
> >
> > Private Sub CreateXML()
> > SortByRadioMeter()
> > Dim _HTMWORowS As String = String.Empty
> > Dim sBodyHTML As String = My.Settings.HTMMail
> > sBodyHTML = sBodyHTML.Replace("#var:gebn#", Me.ProgNaam)
> > sBodyHTML = sBodyHTML.Replace("#var:start#", Date.Now.ToString)
> > Dim iCount As Integer = 0
> > Try
> > For Each Me._WONr In ParVals
> > If CancellProcess Then Exit Sub 'wanneer ontvangen dan
> > stoppen met verwerken
> > Try
> > Using clsRep As New clsReport(_WONr, Me.GebruikersNaam,
> > Me.ProgNaam, Me.PrinterId)
> > 'events binden aan handler methods
> > AddHandler clsRep.ErrorOccured, AddressOf
> > clsRepError
> > AddHandler clsRep.eSuccess, AddressOf
> > clsRepeSuccess
> > 'start genereren rapport
> > clsRep.CreateRep()
> > iCount += 1
> > _HTMWORowS = String.Concat(_HTMWORowS,
> > My.Settings.HTMWoRow.Replace("#var:wo#", _WONr.ToString),
> > Environment.NewLine)
> > End Using
> > Catch ex As Exception
> > MyBase.RaiseError("W.O." & Environment.NewLine &
> > Environment.NewLine & ex.ToString & Environment.NewLine & " Values :
> > ObjectNr= " & _WONr.ToString & " User started =" & Me.GebruikersNaam)
> > End Try
> > Next
> > Catch ex As Exception
> > MyBase.RaiseProcessCancell("W.O. Print " & Environment.NewLine
> > &
> > ex.ToString & Environment.NewLine & Environment.NewLine & " Values :
> > ObjectNr= " & _WONr.ToString & " User started =" & Me.GebruikersNaam)
> > Finally
> > sBodyHTML = sBodyHTML.Replace("#var:start#", Date.Now.ToString)
> > sBodyHTML = sBodyHTML.Replace("#var:body#", _HTMWORowS)
> > Try
> > Dim email As New ista.EMail
> > If email.ValidEMail(My.Settings.SendWoMail) Then
> >
> > email.SendMailMessage(My.Settings.SendWoMail,
> > sBodyHTML,
> > "NePros@istanederland.nl", My.Settings.SendWoMailBCC,
> > My.Settings.SendWoMailCC, String.Concat("W.O. Print ",
> > Date.Now.ToShortDateString, " aantal=", iCount.ToString), True)
> > End If
> > Catch ex As Exception
> > MyBase.RaiseError(ex.ToString)
> > End Try
> > End Try
> > End Sub
> >
> >
> > :-(
> >
> > Michel
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>

Re: strange problem with smtpmail by Andrew

Andrew
Wed Mar 12 11:51:48 CDT 2008

Michel Posseth [MCP] wrote:
> Note that remote server is a BLS server ( not a web server ) but a
> windows service wich starts dll`s through reflection
>
> If i copy a test project ( exe ) to this server and run in the same
> user context as the service is running , everything works as
> expected , but if the service invokes the method (through
> interfacing and reflection ) the e-mails are send but arrive as HTML
> source instead of formatted HTML
>
> So the problem must be in the combination Reflection and SMTP class
>
> ( for the time beeing i send my mails from this service now as plain
> text , wich works fine )
>
> but i wonder why it wil not work with HTML formatting

Can you grab a copy of the email from the maildrop folder before it gets
sent? Maybe comparing that file with one grabbed from a working system will
explain it.

Andrew



Re: strange problem with smtpmail by Michel

Michel
Wed Mar 12 14:40:18 CDT 2008


"Andrew Morton" <akm@in-press.co.uk.invalid> schreef in bericht
news:uyAThFGhIHA.3940@TK2MSFTNGP05.phx.gbl...
> Michel Posseth [MCP] wrote:
>> Note that remote server is a BLS server ( not a web server ) but a
>> windows service wich starts dll`s through reflection
>>
>> If i copy a test project ( exe ) to this server and run in the same
>> user context as the service is running , everything works as
>> expected , but if the service invokes the method (through
>> interfacing and reflection ) the e-mails are send but arrive as HTML
>> source instead of formatted HTML
>>
>> So the problem must be in the combination Reflection and SMTP class
>>
>> ( for the time beeing i send my mails from this service now as plain
>> text , wich works fine )
>>
>> but i wonder why it wil not work with HTML formatting
>
> Can you grab a copy of the email from the maildrop folder before it gets
> sent? Maybe comparing that file with one grabbed from a working system
> will explain it.
>
> Andrew
>

Until sofar i was unsuccesfull as the SMTP server is running somewhere in
Germany and is managed there by our shared services IT and i am in the
Netherlands :-(

But as i said i now know that nothing is wrong with my code , as i can send
HTML formatted mail from anny computer even on that specific server the only
way it doesn`t work in HTML formatted modus is when the e-mail is send from
a dll that is invoked with reflection from our queu service . if i invoke
that same dll and it`s processing method with a button in a test executable
it works fine ( the HTML template is stored in the dll`s config file )


When the e-mail is received outlook says it is HTML formatted I noticed that
the "<" characters become "&lt;" and the ">" character becomes "&gt;" in
the message source in the Outlook view window it shows up like my HTML
template was designed ( just as if you want to display HTML source code
from a HTML page )

I just get frustrated if i can`t explain something like this :-( ( my boss
is already happy with the plain text mails i now send ,, but i just wonder
why it doesn`t work )

Michel




Re: strange problem with smtpmail by kimiraikkonen

kimiraikkonen
Wed Mar 12 14:59:34 CDT 2008

On Mar 12, 9:40=A0pm, "Michel Posseth [MCP]" <M...@posseth.com> wrote:
> "Andrew Morton" <a...@in-press.co.uk.invalid> schreef in berichtnews:uyATh=
FGhIHA.3940@TK2MSFTNGP05.phx.gbl...
>
>
>
>
>
> > Michel Posseth [MCP] wrote:
> >> Note that remote server is a BLS server ( not a web server ) but a
> >> windows service wich starts dll`s through reflection
>
> >> If i copy a test project ( exe ) to this server and run in the same
> >> user context as the service is running , =A0everything works as
> >> expected , but if the service invokes the method =A0(through
> >> interfacing and reflection ) the e-mails are send but arrive as HTML
> >> source =A0instead of formatted HTML
>
> >> So the problem must be in the combination Reflection and SMTP class
>
> >> ( for the time beeing i send my mails from this service now as plain
> >> text , wich works fine )
>
> >> but i wonder why it wil not work with HTML formatting
>
> > Can you grab a copy of the email from the maildrop folder before it gets=

> > sent? Maybe comparing that file with one grabbed from a working system
> > will explain it.
>
> > Andrew
>
> Until sofar i was unsuccesfull as the SMTP server is running somewhere in
> Germany and is managed there =A0by our shared services IT =A0 and i am in =
the
> Netherlands :-(
>
> But as i said i now know that nothing is wrong with my code , as i can sen=
d
> HTML formatted mail from anny computer even on that specific server the on=
ly
> way it doesn`t work in HTML formatted modus is when the e-mail is send fro=
m
> a dll that is invoked =A0with reflection from our queu service =A0. if i i=
nvoke
> that same dll and it`s processing method =A0with a button in a test execut=
able
> it works fine ( the HTML template is stored in the dll`s config file )
>
> When the e-mail is received outlook says it is HTML formatted I noticed th=
at
> the =A0"<" characters become "&lt;" and the ">" character becomes "&gt;" =
=A0in
> the message source in the Outlook view window it shows up like my HTML
> template was designed =A0 =A0( just as if you want to display HTML source =
code
> from a HTML page )
>
> I just get frustrated if i can`t explain something like this :-( =A0 ( my =
boss
> is already happy with the plain text mails i now send ,, but i just wonder=

> why it doesn`t work =A0)
>
> Michel- Hide quoted text -
>
> - Show quoted text -

Michel,
Does target machine (server) have trouble receving HTML-based mail
just specific to yours or other clients? If it's common with the
server, it shouldn't be wrong in your code as i agree.

If your situation is urgent, then make your software send the HTML
file (.html or .htm) as attachment using SMTPClient for quick solution
not to lose the HTML markup till you or target machine solve the
problem.

Hope you solve.

SOLVED !! by MichelPossethMCP

MichelPossethMCP
Thu Mar 27 05:08:00 CDT 2008



I was verry bussy with a project so , i just went on with sending the
e-mails in plain text .

However yesterday i had a lightbulb moment :-) checked it and indeed i
found the solution

My html template comes from the settings file , and this is going wrong in
the situation that the dll that sends the e-mail is beeing started through
reflection .

the texts is then beeing encoded

i solved this by letting the dll read the HTML template from a text file

so problem is solved and the cause is now known

HTML stored in the config file`s property icw reflection is a no go ! (
with assemblies started in the normall way this is not a problem )


Regards

Michel