This format seems to work fine for the ‘From’ email address. Since I am testing this by sending to myself, the ‘From’ appears as ‘Steven Portnoy’ as it should. Ultimately the recipients will be pulled from values in a field, but this happens even when I hard-code the text string in the sendMail parameters. There will also be cases when there are multiple recipients in the form of
Just to be clear, does ‘fixed after Servoy 2.2 RC7’ mean it is fixed in the version that will come after 2.2 RC7 or it is fixed in 2.2 RC7. If it means it is fixed in 2.2 RC7, it isn’t fixed yet.
Just came across something in the mail-plugin: it looks like whatever the content is, Servoy sets the content type to multipart/mixed. At least in Thunderbird a message always appears to have attachments, no matter if there are any or not. Can this be improved?
It support the following types:
-text/plain when the message text does not contain ‘’
-text/html when the message text starts with ‘’
-“alternative” with both text/plain and text/html when in the message ‘’ is found
the last option makes it possible to contruct a message like:
my textual mailmy html mail
so you can specify different messages for different formats.
so the actual text is not nested in parts. We have tested that with Outlook as well: Outlook shows an attachment icon first until you click on the message once. Then that disappears. Thunderbird only shows an attachment icon in the list, not in the actual message. Just send a test mail from Servoy to Jan Aleman, he seems to be using Thunderbird (at least this is what I see in the last newsletter).
hmm. Just downloaded the plugin and tried. When addressing in the form
name
I now get an error
nested exception is:
class com.sun.mail.smtp.SMTPAddressFailedException: 501 bad address syntax:
;
nested exception is:
class com.sun.mail.smtp.SMTPAddressFailedException: 501 bad address syntax: <G.>
;
nested exception is:
class com.sun.mail.smtp.SMTPAddressFailedException: 501 bad address syntax:
which I didn’t get before… And the mail still arrives as having attachments in Thunderbird.
Not showing any attachment, but if you open the mail, there is!
this is my method:
//print the current form as pdf into a variable
var success = plugins.pdf_output.startMetaPrintJob()
if (success)
{
forms.contact_timing_agenda_print.controller.print(false,false,plugins.pdf_output.getPDFPrinter());
}
var thePdf = plugins.pdf_output.endMetaPrintJob()
//email the pdf
var attachment1 = plugins.mail.createBinaryAttachment('Agenda '+ contactfirstname + ' ' + contactlastname + '.pdf',thePdf);
var succes = plugins.mail.sendMail(to,from,subject,msgText,null,null,new Array(attachment1));