on 08-18-2008 10:20 AM
Hi All ,
When we want to send Emails through Web Dynpro java application , what are the necessary or prilimanry things needed ?
1 ) In my application , jar files are there ( activation and mail )
When deployed and run it is giving no errors but mails are not going .
Secondly , from portal ( abap stack ) sap inbox when i send message to any company mail id , it is going
That is SMTP in portal is configured .
I could not understand , why it is not going from Portal ?
Also Do I need any configuration / setttings in
1) Config tool
2) Visual Adminstrator
3) Sys Adm - Sys config - UME - Emails notification
and SYstem
Regards,
Suray
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
plz refer this blog....
and if there is any prob let me know.
refer the following links
http://help.sap.com/erp2005_ehp_03/helpdata/EN/8d/6bd83e8cb23d67e10000000a114084/frameset.htm
https://forums.sdn.sap.com/click.jspa?searchID=1063990&messageID=1486766
http://hc.apache.org/httpclient-3.x/methods/post.html
But if you don't need its, maybe this link can post can help you.
Code
try
{
String strSMTPIPAddress ="192.168.100.103";
Properties props;
Session session;
Provider p;
props = System.getProperties();
props.put("mail.smtp.host", strSMTPIPAddress);
session = Session.getDefaultInstance(props, null);
StringBuffer strMailBody = new StringBuffer();
wdThis.createmailbody(strMailBody);
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress("<give the email address here>"));
message.addRecipient(Message.RecipientType.TO, new InternetAddress("<email address>"));
message.setSubject("<give the subject of mail>");
MimeMultipart mimemultipart = new MimeMultipart();
// //set message content
//this is body content
MimeBodyPart mimebodypart1=new MimeBodyPart();
//This is attachmnent
MimeBodyPart mimebodypart2=new MimeBodyPart();
// mimebodypart1.setText("xxx"); //Attachment
mimebodypart2.setText("<give the content of attachemnt>');
mimemultipart.addBodyPart(mimebodypart1);
mimemultipart.addBodyPart(mimebodypart2);
//message.setText(wdContext.currentContextElement().getSalorder());
message.setContent(mimemultipart);
message.setText(strMailBody.toString());
Transport.send(message);
wdComponentAPI.getMessageManager().reportSuccess("E-mail is sent to sharanya");
}
catch (Exception e)
{
wdComponentAPI.getMessageManager().raiseException("Exception" + e.getMessage(), true);
}
Thanks
Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
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.