Page 1 of 1

Email body disappears with attachments. It wasn't me!

Posted: Mon Apr 10, 2017 10:13 pm
by Pud
A few simple lines of code to send an email.
If I add an attachement the body is ignored.
If I remove the attachement the body is ok

Is this correct?

Cheers.

Re: Is it me?

Posted: Tue Apr 11, 2017 12:52 am
by Pud

Code: Select all

;With some further testing using PB 5.60

InitNetwork()
Procedure mail1() 
          
          CreateMail(0,myemailaddress,"Some subject")   
          SetMailBody(0,"Test Body")
           ;AddMailAttachment(0,"JPG","m:\me.jpg")              
          AddMailRecipient(0,myemailaddress,#PB_Mail_To)  
          SendMail(0,myserver,25,0,myusername,mypassword)
          FreeMail(0)

EndProcedure
mail1()

;The body text is sent ok. 

Procedure mail2() 
          
          CreateMail(0,myemailaddress,"Some subject")   
          SetMailBody(0,"Test Body")
          AddMailAttachment(0,"JPG","m:\me.jpg")              
          AddMailRecipient(0,myemailaddress,#PB_Mail_To)  
          SendMail(0,myserver,25,0,myusername,mypassword)
          FreeMail(0)

EndProcedure
mail2()

;The body text is ignored


;Works as expected with PB 5.24
_____________________________________________
Code tags added
11.04.2017
RSBasic

Re: Is it me?

Posted: Tue Apr 11, 2017 10:53 am
by Sicro
It is a already reported bug in PB:
http://www.purebasic.fr/english/viewtop ... =4&t=65423

Please set a better thread title. "Is it me?" tells nothing about the content of the thread.

Re: Is it me?

Posted: Sat Apr 22, 2017 11:38 am
by Pud
A workaround is to add a CRLF at the beginning of the body text. This works for me.

Re: Is it me?

Posted: Sat Apr 22, 2017 2:11 pm
by IdeasVacuum
A workaround is to add a CRLF at the beginning of the body text. This works for me.
That's useful to know Pud, thanks.

Please set a better thread title. "Is it me?" tells nothing about the content of the thread.

Re: Is it me?

Posted: Sat Apr 22, 2017 5:31 pm
by Pud
IdeasVacuum wrote:
A workaround is to add a CRLF at the beginning of the body text. This works for me.
That's useful to know Pud, thanks.

Please set a better thread title. "Is it me?" tells nothing about the content of the thread.
Ya, I’ve already been told off for that :oops:

It’s just that the other couple of dozen ‘bugs’ I’ve found turned out to be me being totally stupid and ‘code blind’. I couldn’t believe I’d found a real bug.

Re: Is it me?

Posted: Sat Apr 22, 2017 6:37 pm
by Demivec
Pud wrote:
IdeasVacuum wrote:
A workaround is to add a CRLF at the beginning of the body text. This works for me.
That's useful to know Pud, thanks.

Please set a better thread title. "Is it me?" tells nothing about the content of the thread.
Ya, I’ve already been told off for that :oops:

It’s just that the other couple of dozen ‘bugs’ I’ve found turned out to be me being totally stupid and ‘code blind’. I couldn’t believe I’d found a real bug.
I don't mean to be harsh but the repetition comes from the title remaining unchanged. You just have to edit the title in the first message of the thread to correct it. :wink:

Re: Email body disappears with attachments. It wasn't me!

Posted: Sat Apr 22, 2017 11:05 pm
by Pud
I didn't know you could do that. Fixed.

Re: Email body disappears with attachments. It wasn't me!

Posted: Sun Apr 23, 2017 10:17 am
by IdeasVacuum
:mrgreen: Your discovery that a simple #CRLF$ makes the difference will be music to the ears for a lot of people.