Jmail - Attachment bliver til skodkode i mail
Hej Experter,Jeg har lavet et lille system som skal sende en mail ud med er vedhæftet fil.
men mailen jeg modtager ser ret mærkelig ud.
koden til at udsende min mail ser således ud:
Set mailer = Server.CreateObject("JMail.Message")
mailer.From = "xxxx"
mailer.FromName = navn
mailer.AddRecipient "xxxx"
mailer.Subject = "Formular: Lærling"
mailer.Priority = 3
mailer.Body = message
' Attach file hvis der er en.
if len(filename) > 0 then
mailer.AddAttachment("d:/inetpub/wwwroot/XXX/Files/Attachments/"& filename)
end if
mailer.contenttype = "text/plain"
mailer.Send(serverIP)
det jeg modtager i min inbox ser således ud.
This is a multipart message in MIME format.
----NEXT_BM_88EB1ADC5067442194271030BE34C92D
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: Quoted-Printable
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Kontakt oplysninger =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Navn: TestNavn
Adresse: Test
Postnr=2E By: 1111 Postnummer
Telefon: 111111111
E-mail: [nospam]@test=2Edk
Eftersendes referencer=3F: Nej
Vedh=E6ftet fil: test=2Etxt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
----NEXT_BM_88EB1ADC5067442194271030BE34C92D
Content-Type: application/octet-stream; name="=?iso-8859-1?Q?/inetpub/wwwroot/XXX/Files/Attachments/test=2Etxt?="
Content-Transfer-Encoding: base64
Content-Description: =?iso-8859-1?Q?/inetpub/wwwroot/XXX/Files/Attachments/test=2Etxt?=
Content-Disposition: attachment; filename="=?iso-8859-1?Q?/inetpub/wwwroot/XXX/Files/Attachments/test=2Etxt?="
Content-ID: <F4F56358C31C438B9E01F5201B41DEDE>
aGVq
----NEXT_BM_88EB1ADC5067442194271030BE34C92D--