Le 23/04/2013 15:15, Willy Raets a écrit : > Hello, > > Another question on the use of smtp. > > When in an application I do: > > hMail.Add(tarBody.Text) > > The content of tarBody (a TextArea) is send as body of the email > So on opening the mail you see this as the mail body as I expect. > There is no attachement > > When doing: > > hMail.Add(tarBody.Text) > hMail.Add(tarAttachment.Text, "text/plain", "Attachment-" & sAddition & > ".txt") > > Content of both tarBody and tarAttachment (both TextAreas) are added > each as an attachment to the mail when send. On opening the mail there > is NO body and there are 2 attachments. > > What I expect is tarBody being the content (body) of the mail and > tarAttachment being added as an attachment. So I expect only 1 > attachment instead of two. > > How can I ensure that the content of tarBody is NOT added as attachment > but as body of the mail and only tarAttachment is attached as > attachment? > > Why in the first code tarBody is no attachment but body content of the > mail and in second code it is added as attachement? > > Anyone know how to solve this? Am I overlooking something? >
I don't have this problem. I know that gb.net.smtp will create only a multipart mail, but I always see the text contents as the body. Can you send me such a mail so that I see if I get two attachments or a body and an attachment? Which mail client do you use? -- Benoît Minisini ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user