Javax mail sendpulse smtp server

Stop Overpaying for Email and Get the Best Value in Email Delivery & Email Marketing Tools. Import Your Contacts in Minutes and Set Up your Email Delivery Easily. Get Started Today! Powerful API. Plugins Available. Free Templates Available. Drag & Drop Editor.

Javax mail sendpulse smtp server

I'm trying to setup Javax.mail to work with sendpulse smtp server (actually had different prob with other also).

currently it's always just hangs here System.out.println("\n\n 3rd ===> Get Session and Send mail");. No exceptions (even i setup a timeouts), nothing.

Also, debug shown me that transport contains login value as mypcname@smtp-pulse.com, which is not right. and the defaultPort = 465 (instead of 2525 set by me in properties)

smtp serve configured by input string smtp-pulse.com,2525,maemail@yahoo.com,mypass ->

the current method to send (tried a lot of different options):

public SMTPresponce SendHtmlEmail(String receipient){
    Integer timeout = 20000;

    logger.info("Sending to: "+receipient);

    // Step1
    System.out.println("\n 1st ===> setup Mail Server Properties..");
    mailServerProperties = System.getProperties();
    mailServerProperties.setProperty("mail.transport.protocol", "smtp");
    mailServerProperties.setProperty("mail.smtp.host", accountSMTP.getHost());
    mailServerProperties.setProperty("mail.smtp.port", accountSMTP.getPort());
    mailServerProperties.setProperty("mail.smtp.starttls.enable", "true");
    mailServerProperties.setProperty("mail.smtp.ssl.enable", "true");
    mailServerProperties.setProperty("mail.smtp.ssl.trust", "*");
    mailServerProperties.setProperty("mail.smtp.auth", "true");
    mailServerProperties.setProperty("mail.smtp.timeout", timeout.toString());
    mailServerProperties.setProperty("mail.smtp.connectiontimeout", timeout.toString());


    try {
        System.out.println("\n\n 2nd ===> get Mail Session..");
        getMailSession = Session.getDefaultInstance(mailServerProperties, new javax.mail.Authenticator() {
            @Override
            protected PasswordAuthentication getPasswordAuthentication() {
                return new PasswordAuthentication(accountSMTP.getLogin(), accountSMTP.getPassword());
            }
        });
        generateMailMessage = new MimeMessage(getMailSession);
        generateMailMessage.addRecipient(Message.RecipientType.TO, new InternetAddress(receipient));
        generateMailMessage.addRecipient(Message.RecipientType.CC, new InternetAddress("test@mail.com"));
        try {
            generateMailMessage.setFrom(new InternetAddress(messageMy.getFinalFrom(), messageMy.getReply_to()));
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();

Click Here to Visit

What's Your Reaction?

like
0
dislike
0
love
0
funny
0
angry
0
sad
0
wow
0