# Mail Plugin change with Servoy 513?

**URL:** https://forum.servoy.com/t/mail-plugin-change-with-servoy-513/12227
**Category:** Classic Servoy
**Created:** [May 24, 2010, 6:52pm UTC](https://forum.servoy.com/t/mail-plugin-change-with-servoy-513/12227 "2010-05-24T18:52:06Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![dpearce](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@dpearce](https://forum.servoy.com/u/dpearce)
#### Post date: [May 24, 2010, 6:52pm UTC](https://forum.servoy.com/t/mail-plugin-change-with-servoy-513/12227/1 "2010-05-24T18:52:06Z")

</div>

I have just updated my server to 5.13 from 5.01,

the mail plugin now crashes out when i try to create an attachment.

The following line works in 5.01 and 3.5 before it:

```auto
var attachment = plugins.mail.createBinaryAttachment('report_'+id+'.pdf',medleg_client_to_so_appointments.rw_final_report);

```

where medleg\_client\_to\_so\_appointments.rw\_final\_report is pdf in a blob field.

I now get the error:

```auto
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: javax/mail/MessagingException
	at com.servoy.extensions.plugins.mail.MailPlugin.getScriptObject(MailPlugin.java:68)
	at com.servoy.j2db.scripting.Zk.get(Zk.java:22)
	at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1641)
	at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1429)
	at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1418)
	at org.mozilla.javascript.gen.c33._c0(DISPATCH_1_REPORT:1244)
	at org.mozilla.javascript.gen.c33.call(DISPATCH_1_REPORT)
	at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:101)
	at org.mozilla.javascript.gen.c32._c0(DISPATCH:906)
	at org.mozilla.javascript.gen.c32.call(DISPATCH)
	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3127)
	at org.mozilla.javascript.gen.c32.call(DISPATCH)
	at com.servoy.j2db.scripting.Ztb.executeFunction(Ztb.java:122)
	at com.servoy.j2db.Zwb.Za(Zwb.java:946)
	at com.servoy.j2db.Zwb.Za(Zwb.java:953)
	at com.servoy.j2db.Zcc.Za(Zcc.java:2)
	at com.servoy.j2db.ui.BaseEventExecutor.fireEventCommand(BaseEventExecutor.java:23)
	at com.servoy.j2db.ui.BaseEventExecutor.fireEventCommand(BaseEventExecutor.java:19)
	at com.servoy.j2db.ui.BaseEventExecutor.fireActionCommand(BaseEventExecutor.java:68)
	at com.servoy.j2db.dataui.Zab.actionPerformed(Zab.java:1)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
	at java.awt.Component.processMouseEvent(Component.java:6348)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3255)
	at java.awt.Component.processEvent(Component.java:6113)
	at java.awt.Container.processEvent(Container.java:2085)
	at java.awt.Component.dispatchEventImpl(Component.java:4714)
	at java.awt.Container.dispatchEventImpl(Container.java:2143)
	at java.awt.Component.dispatchEvent(Component.java:4544)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
	at java.awt.Container.dispatchEventImpl(Container.java:2129)
	at java.awt.Window.dispatchEventImpl(Window.java:2475)
	at java.awt.Component.dispatchEvent(Component.java:4544)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.ClassNotFoundException: javax.mail.MessagingException
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:257)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:315)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)
	... 46 more

```

So I can no longer create pdf attachments to mail?

Is this a bug in Java, the mail plugin, or was my code just bad and Servoy has just got stricter?

So now i cant use servoy 5.01 as my machines are updated, i cannot delete one space on a mac and can no longer send email attachments! Ill just sit here and Hmm that song from the life of brian, lifes a lump of … when you look at it!

David

---

<div class="post-metadata">

### Author: ![tgs](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@tgs](https://forum.servoy.com/u/tgs)
#### Post date: [May 25, 2010, 7:17pm UTC](https://forum.servoy.com/t/mail-plugin-change-with-servoy-513/12227/2 "2010-05-25T19:17:37Z")

</div>

I just have the same issue!

The email plugin is not working correctly with Servoy 5.1.3! Emails with pdf attachments won’t send from the Servoy Server, but nothing has changed. The functions are the same as in the previous version!

---

<div class="post-metadata">

### Author: ![Harjo](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/harjo/32/4873_2.png) [@Harjo](https://forum.servoy.com/u/Harjo)
#### Post date: [May 25, 2010, 7:18pm UTC](https://forum.servoy.com/t/mail-plugin-change-with-servoy-513/12227/3 "2010-05-25T19:18:22Z")

</div>

anyone filed a case? or contacted Servoy?

---

<div class="post-metadata">

### Author: ![dpearce](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@dpearce](https://forum.servoy.com/u/dpearce)
#### Post date: [May 25, 2010, 10:00pm UTC](https://forum.servoy.com/t/mail-plugin-change-with-servoy-513/12227/4 "2010-05-25T22:00:50Z")

</div>

Not yet,

as an “amateur” I was waiting for someone else to confirm it is not just be stupid!

Hopefully someone will be reading this post, if not I will let someone know tomorrow!

David

---

<div class="post-metadata">

### Author: ![tgs](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@tgs](https://forum.servoy.com/u/tgs)
#### Post date: [May 26, 2010, 8:06am UTC](https://forum.servoy.com/t/mail-plugin-change-with-servoy-513/12227/5 "2010-05-26T08:06:44Z")

</div>

case 294511

---

<div class="post-metadata">

### Author: ![mboegem](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/mboegem/32/4399_2.png) [@mboegem](https://forum.servoy.com/u/mboegem)
#### Post date: [May 26, 2010, 8:08am UTC](https://forum.servoy.com/t/mail-plugin-change-with-servoy-513/12227/6 "2010-05-26T08:08:13Z")

</div>

All I know is that changes have been made to the mail plugin because of ‘threadSafe’ issues.  
Seems solving that introduced other issues…

---

<div class="post-metadata">

### Author: ![Vaj](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@Vaj](https://forum.servoy.com/u/Vaj)
#### Post date: [May 26, 2010, 8:49am UTC](https://forum.servoy.com/t/mail-plugin-change-with-servoy-513/12227/7 "2010-05-26T08:49:54Z")

</div>

Same problem here. Very annoying, can’t upgrade to 5.1.3 to fix some previous issues we had cos now certain other features don’t work.

---

<div class="post-metadata">

### Author: ![mboegem](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/mboegem/32/4399_2.png) [@mboegem](https://forum.servoy.com/u/mboegem)
#### Post date: [May 26, 2010, 9:00am UTC](https://forum.servoy.com/t/mail-plugin-change-with-servoy-513/12227/8 "2010-05-26T09:00:08Z")

</div>

> Vaj:  
> can’t upgrade to 5.1.3 to fix some previous issues we had cos now certain other features don’t work.

try use the mail plugin from 5.1.2 or previous (in that case you need to sign the jar yourself) if this works for you  
It’s just a plugin… ![;-)]( "Wink")

---

<div class="post-metadata">

### Author: ![Vaj](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@Vaj](https://forum.servoy.com/u/Vaj)
#### Post date: [May 26, 2010, 9:29am UTC](https://forum.servoy.com/t/mail-plugin-change-with-servoy-513/12227/9 "2010-05-26T09:29:09Z")

</div>

> mboegem:
> 
> > Vaj:  
> > can’t upgrade to 5.1.3 to fix some previous issues we had cos now certain other features don’t work.
> 
> try use the mail plugin from 5.1.2 or previous (in that case you need to sign the jar yourself) if this works for you  
> It’s just a plugin… ![;-)]( "Wink")

Good point! ![:D]( "Very Happy") Will give it a try! cheers

---

<div class="post-metadata">

### Author: ![dpearce](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@dpearce](https://forum.servoy.com/u/dpearce)
#### Post date: [May 27, 2010, 8:09am UTC](https://forum.servoy.com/t/mail-plugin-change-with-servoy-513/12227/10 "2010-05-27T08:09:57Z")

</div>

Vaj,

Did that work?

I had assumed that it was some change in Java and not in the actual mail plugin?

David

---

<div class="post-metadata">

### Author: ![Vaj](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@Vaj](https://forum.servoy.com/u/Vaj)
#### Post date: [May 27, 2010, 10:34am UTC](https://forum.servoy.com/t/mail-plugin-change-with-servoy-513/12227/11 "2010-05-27T10:34:20Z")

</div>

> dpearce:  
> Vaj,
> 
> Did that work?
> 
> I had assumed that it was some change in Java and not in the actual mail plugin?
> 
> David

David,  
Sorry for the late reply, My VM was acting up.  
Replacing the mail plugin with the one from 5.1.2 worked.  
I copied over the plugin, unsigned all jars and resigned them and voila! ![:)]( "Smile")  
Cheers,
