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.
Email body disappears with attachments. It wasn't me!
Email body disappears with attachments. It wasn't me!
Last edited by Pud on Sat Apr 22, 2017 11:04 pm, edited 1 time in total.
Re: Is it me?
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?
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.
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.
Why OpenSource should have a license :: PB-CodeArchiv-Rebirth :: Pleasant-Dark (syntax color scheme) :: RegEx-Engine (compiles RegExes to NFA/DFA)
Manjaro Xfce x64 (Main system) :: Windows 10 Home (VirtualBox) :: Newest PureBasic version
Re: Is it me?
A workaround is to add a CRLF at the beginning of the body text. This works for me.
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Is it me?
That's useful to know Pud, thanks.A workaround is to add a CRLF at the beginning of the body text. This works for me.
Please set a better thread title. "Is it me?" tells nothing about the content of the thread.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Is it me?
Ya, I’ve already been told off for thatIdeasVacuum wrote:That's useful to know Pud, thanks.A workaround is to add a CRLF at the beginning of the body text. This works for me.
Please set a better thread title. "Is it me?" tells nothing about the content of the thread.
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?
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.Pud wrote:Ya, I’ve already been told off for thatIdeasVacuum wrote:That's useful to know Pud, thanks.A workaround is to add a CRLF at the beginning of the body text. This works for me.
Please set a better thread title. "Is it me?" tells nothing about the content of the thread.
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: Email body disappears with attachments. It wasn't me!
I didn't know you could do that. Fixed.
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Email body disappears with attachments. It wasn't me!
Your discovery that a simple #CRLF$ makes the difference will be music to the ears for a lot of people.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.