Problem assigning 'To' e-mail address using plug-in

I would like to pass the e-mail plug-in a recipient e-mail address in the form of

Steve Portnoy sportnoy@socal.rr.com

but when I do, the plug-in seems to be turning it into

Steve@ms-smtp-03-eri0.socal.rr.com, Portnoy@ms-smtp-03-eri0.socal.rr.com, sportnoy@socal.rr.com

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

Bob Smith bob@email.com, Fred Smith fred@email.com

Any ideas?
Thanks,
Steve Portnoy

Will be fixed after Servoy 2.2 RC7

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.

Means it will be in Servoy 2.2 rc8, which likly is the final

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?

Thanks
Patrick

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.

I am sending a plain text content and the mail header looks like this:

Subject: qweqwe
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary=“----=_Part_3_18632438.1115714458847”
Date: Tue, 10 May 2005 10:41:00 +0200
X-Provags-ID: kundenserver.de abuse@kundenserver.de login:bd88bb7044d2d9d6eb278b7e5b0a7f68
Envelope-To: mup@ruhsert.de

------=_Part_3_18632438.1115714458847
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

qweqweqweqwewqe
------=_Part_3_18632438.1115714458847–

This multipart/mixed makes Thunderbird think there is an attachment, I believe?

Strange I have never seen this, as fas as I know a mail always exists out of:
MimeMessage
-MimeMultipart
–MimeBodyPart(s)

Where the bodyparts are text and/or htmltext plus attachements… identified by there mimetypes

After a review for possible couse it seems we can set the disposition to inline/attachment…which we did not do at all

fix: http://downloads.servoy.com/beta/22x_product/mail.jar

I looked at extended headers of quite a few mails now. It seems that if a message contains only text, the header looks like

Mime-Version: 1.0
Content-Type: text/plain; charset=“ISO-8859-1”; format=flowed
Content-Transfer-Encoding: quoted-printable
Date:
To:
From:
Subject:
Envelope-To:

text text text

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.

can you give met the exact call to the mail plugin that you do?

Jan Blok:
After a review for possible couse it seems we can set the disposition to inline/attachment…which we did not do at all

fix: http://downloads.servoy.com/beta/22x_product/mail.jar

Jan, is it possible to set the smtp-server by scripting, also? just as you can do with the pop3-server?

Jan, is it possible to set the smtp-server by scripting, also? just as you can do with the pop3-server?

Would add my support to Harjo’s request for this feature.

Or if not possible in short term could Servoy Client Edit/Preferences be extended to include the Mail tab ?

Thanks in advance

Graham Greensall
Worxinfo Ltd

Jan, is it possible to set the smtp-server by scripting, also? just as you can do with the pop3-server?

Added, will be available in next release.

How about this problem that mails in Thunderbird (and shortly in Outlook) appear to have an attachment, even if they do not?

I have it the other way around! :shock:

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));

Very strange!

Can you send me one of those mails? Seems like a mail client bug if there IS an attachment but it does not show it.

No, it was not en emailclient issue, but a plugin-issue.

I could’nt reproduce this on my developer machine, so I looked at my server and saw that I used an older version of the mail-plugin.

I updated to the newest one, and now it is working fine!

But I can send you a mail that seems to have an attachment, but doesn’t in Thunderbird and Outlook (only shortly).