cancel
Showing results for 
Search instead for 
Did you mean: 

send a mail in web dnypro

Former Member
0 Kudos

when i push the button to send a mail in my Web dnypro application

there is an warning occured like this:

Sending failed; nested exception is: javax.mail.MessagingException: 454 5.7.3 Client does not have permission to submit mail to this server.

what's the matter?(is that interrelated with the sending mail host)

Accepted Solutions (1)

Accepted Solutions (1)

former_member193726
Active Participant
0 Kudos

Hi Bo,

Do you have a firewall placed? If yes have the appropriate ports been opened?

To start with try to open all ports so that we can make sure the firewall is causing the problem.

Regards,

Rekha Malavathu

Former Member
0 Kudos

Hi Rekha

Thanks, it's should be the business of the port.

Answers (2)

Answers (2)

former_member193726
Active Participant
0 Kudos

Hi Bo,

Check with your system administrator. You may take their help in opening the port.

If this helps, would request you to close the thread else let me know so that I could try some other possibility.

Regards,

Rekha Malavathu

Former Member
0 Kudos

Make sure you maintain java mail client settings in Visual Admin

use the following code example to send mail messages

Properties props = new Properties();

props.put("domain", "true");

Context initialContext = new InitialContext(props);

Session sess = (Session) initialContext.lookup("java:comp/env/mail/MailSession");

Session mailSession = Session.getDefaultInstance(sess.getProperties());

Transport transport = mailSession.getTransport("smtp");

//MimeMessage message = new MimeMessage(sess);

MimeMessage message = new MimeMessage(mailSession);

message.setSubject("Your ERP Portal Certificate");

message.setFrom(new InternetAddress("portal@portal.com"));

message.addRecipient(javax.mail.Message.RecipientType.TO, new InternetAddress(userArr.getEmail()));

//

// This HTML mail have to 2 part, the BODY and the embedded image

//

MimeMultipart multipart = new MimeMultipart("related");

// first part (the html)

BodyPart messageBodyPart = new MimeBodyPart();

String htmlText ="Dear ERP user , </b>" ; messageBodyPart.setContent(htmlText, "text/html");

// add it

multipart.addBodyPart(messageBodyPart);

// put everything together

message.setContent(multipart);

transport.connect();

transport.sendMessage(message, message.getRecipients(javax.mail.Message.RecipientType.TO));

transport.close();

proxy.gotoPage("umHelpPage");

uidUserCreatteLog(userArr.getEmail());

}

chk it also