on 04-14-2010 1:04 PM
Hi all,
How to send main in WebDynpro java. I want to send a link and a id to one person after button click. how to do this.
regards,
shreeharsha
Hi Sreeharsha
Please refer to [Web Dynpro Applications Using the JavaMail API|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2678e05a-0701-0010-fa86-ddfbec5a2b94]
Hope it helps
Regards
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arun,
i am getting an error message "Failed to create request".what is the reason.
when i run the java program in the eclipse i gave me the following error
Exception while sending mailSending failed; nested exception is: javax.mail.AuthenticationFailedException javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.AuthenticationFailedExceptionResult:false at javax.mail.Transport.send0(Transport.java:219) at javax.mail.Transport.send(Transport.java:81) at com.sap.client.sendmail.SendMail.sendMail(SendMail.java:46) at com.sap.client.sendmail.SendMail.main(SendMail.jav
regards,
shreeharsha
Hi Shreeharsha,
Please check the user authentication...in while creating Authenticator object. You need to create jave file and place in the wd project.
public class Auth extends Authenticator {
public PasswordAuthentication getPasswordAuthentication()
{
String username = "";
String password = "";
return new PasswordAuthentication(username,password);
}
}
verify your SMTP port and host....check if default port 25 is open or not for accetpting mails
Hope it helps
Regards
Arun
Hi Arun,
What host name i have to give? will it work if i give host name gmail or the ip address.
i have created authentication class in wd project. after that it is giving below error.
what user name and passwd i have to give.
Exception while sending mailSending failed;
nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25
javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25
at javax.mail.Transport.send0(Transport.java:219)
at javax.mail.Transport.send(Transport.java:81)
at com.sap.client.sendmail.SendMail.sendMail(SendMail.java:47)
at com.sap.client.sendmail.SendMail.main(SendMail.java:58)
Result:false
regards
shreeharsha
Hi Shreeharsha,
You need to provide your company SMTP mail detail like while setting in the properties and use port 25 in transport creation if required.
String host = "<SMTP Details like SMTP server name + Company Domain>";
// Initialize Session
Properties props = System.getProperties();
props.put("mail.smtp.host", host);
props.put("mail.smtp.auth", "true");
Authenticator auth = new <Auth class that extend Authenticator>();
Session session = Session.getInstance(props, auth);
>> What host name i have to give? will it work if i give host name gmail or the ip address.
User your company SMTP Details. I don't think it will work..try it.
>> what user name and passwd i have to give.
Your mail user id and password will work.
You can very using telent with above details for sending mail with port 25 is open or not.
Hope it helps
Regards
Arun
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.