on 08-29-2007 9:26 AM
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)
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.