Jump to content

Java mail with SMTP proxy

- - - - -

  • Please log in to reply
No replies to this topic

#1
arnie137

arnie137

    Newbie

  • Members
  • Pip
  • 2 posts
Hi...i am crating application which is using proxy for internet comunication and i want to know how i can set SMTP proxy for it in my java application

Here is my java code for mailing:

Email email = new SimpleEmail();
email.setHostName("smtp.gmail.com");
email.setFrom(from);
email.setSmtpPort(587);
email.setAuthenticator(new DefaultAuthenticator(mail, password));
email.setTLS(true);
email.setSubject(subject);
email.setMsg(text);
email.addTo(dst);
email.send();
I am using library from Appache.
Thanks for all answers




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users