MailPro and MailMessage depracated

Questions and answers on developing, deploying and using plugins and JavaBeans

MailPro and MailMessage depracated

Postby steve1376656734 » Thu Oct 24, 2013 10:08 am

Apologies if this message is a bit garbled but I'm having problems figuring out the best way to explain my issue :?

I have just downloaded the MailPro plugin and am trying to use it to replace the mail functionality I have in the solution currently.

My problem is that I am having inconsistent results with declaring variables or parameters using the MailPro types. For example, the following declaration works absolutely fine:

Code: Select all
/** @type {SMTPAccount} */
var account = plugins.MailPro.SMTPAccount("noreply");

But this one:

Code: Select all
/** @type {MailMessage} */
var testMessage;

gives me a warning saying "The type MailMessage is deprecated" and hovering over it with the ALT key pressed gives no alternative as you would usually see and if I change the declaration to:

Code: Select all
/** @type {plugins.MailPro.MailMessage} */
var testMesage;

I get a warning saying "Unknown type plugins.MailPro.MailMessage"

If I use the deprecated MailMessage type then I don't have access to any of the methods or properties that are listed under the MailMessage section in the developer

Does anyone have any sample code or documentation for the MailPro plugin that would get me going?

Thanks

Steve
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 330
Joined: Fri Aug 16, 2013 2:38 pm
Location: Ashford, UK

Re: MailPro and MailMessage depracated

Postby patrick » Thu Oct 24, 2013 10:59 am

This all happens because the MailPro plugin still works with Servoy 3.5. The downside is, that it doesn't work so well with code completion in Developer 5 or later.

All the methods and properties that you see under MailMessage in MailPro will work, but give you a warning. I am working on a version that is Servoy 6 and later only, but can't tell you right now when it will be ready. For the time being, you will have to live with the warnings and missing code completion.
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: MailPro and MailMessage depracated

Postby Harjo » Thu Oct 24, 2013 3:08 pm

or use:

Code: Select all
/** @type {*} */


that way the warnings also disappears (code completion does not work than)
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: MailPro and MailMessage depracated

Postby steve1376656734 » Thu Oct 24, 2013 3:17 pm

Thanks for the clarification (as I'm relatively new to Servoy I thought I had done something wrong!)

Do you have any documentation or sample solutions that would help with the methods and how best to utilise them. My thoughts are to use the MailPro plugin to try to get around the issue of an unreliable/slow third party mail server by doing a background send and allow the user to get on with job in hand and not have to wait for the server to timeout when trying to send a message. Does the background send have retries etc.?

Thanks

Steve
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 330
Joined: Fri Aug 16, 2013 2:38 pm
Location: Ashford, UK


Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 18 guests