OK well I did post a more lengthy question, then I edited back after I had found the bug.
The actual issue was due to adding an image into an email. I had email with a link working, so all I needed to do was to save the image as a file which I has also had working too.
There my problems started as I merged the save image and send email functions. I had declared
local baseDir = system.DocuementsDirectory for the image save
BUT I think this clashed with the baseDir contained in the mailOptions table contained in the function
local mailOptions ={ to = nil,
cc = nil,
bcc = nil,
subject = “your subject”,
body = “your message”,
attachment = {baseDir = system.DocuementsDirectory, filename = “test.jg”, type =“image” },
isBodtHtml = false,
listener = onSentEmailMine
}
Any I fixed it by using a different name for the image save…
You did ask for more details 
[import]uid: 137150 topic_id: 25132 reply_id: 102531[/import]