[Gambas-user] smpt body vs attachement

Benoît Minisini gambas at ...1...
Mon Apr 29 16:46:35 CEST 2013


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




More information about the User mailing list