summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbouthillie2011-10-03 14:52:38 (EDT)
committerjbouthillie2011-10-03 14:53:58 (EDT)
commit5186ab59e5ada4dcbc14c0b05ab6449408904a4a (patch)
treeed886d68cdfa8ac954e6e0b5ecfd576095a4bf07
parentd72152954b7899ff5b58bd12d2a929fea54e78ed (diff)
downloadorg.eclipse.mylyn.reviews.r4e-5186ab59e5ada4dcbc14c0b05ab6449408904a4a.zip
org.eclipse.mylyn.reviews.r4e-5186ab59e5ada4dcbc14c0b05ab6449408904a4a.tar.gz
org.eclipse.mylyn.reviews.r4e-5186ab59e5ada4dcbc14c0b05ab6449408904a4a.tar.bz2
NEW - bug 359750: R4E SMTP mail services with a null pointer
https://bugs.eclipse.org/bugs/show_bug.cgi?id=359750 Verifying the sender address caused this issue
-rw-r--r--org.eclipse.mylyn.reviews.r4e.mail.smtp/src/org/eclipse/mylyn/reviews/r4e/mail/smtp/mailVersion/Smtp.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.reviews.r4e.mail.smtp/src/org/eclipse/mylyn/reviews/r4e/mail/smtp/mailVersion/Smtp.java b/org.eclipse.mylyn.reviews.r4e.mail.smtp/src/org/eclipse/mylyn/reviews/r4e/mail/smtp/mailVersion/Smtp.java
index 5bc5619..078344b 100644
--- a/org.eclipse.mylyn.reviews.r4e.mail.smtp/src/org/eclipse/mylyn/reviews/r4e/mail/smtp/mailVersion/Smtp.java
+++ b/org.eclipse.mylyn.reviews.r4e.mail.smtp/src/org/eclipse/mylyn/reviews/r4e/mail/smtp/mailVersion/Smtp.java
@@ -279,7 +279,9 @@ public class Smtp extends NotificationsConnector {
props.setProperty("mail.smtp.host", aSMTPServer);
final Session session = Session.getInstance(props, null);
final Message msg = new MimeMessage(session);
- msg.setFrom(new InternetAddress(aFrom));
+ if (aFrom != null && aFrom != "") {
+ msg.setFrom(new InternetAddress(aFrom));
+ }
for (int i = 0; i < aEmails.length; i++) {
msg.addRecipient(Message.RecipientType.TO, new InternetAddress(aEmails[i]));