An easy Example to send a mail!!
Hi,
I never have done anything about send an e_mail.So, i need an easy example about that. Could you tell me how i have to do it.
Thanks in advance,
Monica
Try
http://www.javacommerce.com/articles/sendingmail.htm
or other references in the
"JavaMail API and Internet Mail Resources"
section on the JavaMail home page
(http://java.sun.com/products/javamail/)
Regards
Dave
Similar Messages
-
Sending a mail, not required acknowledge.
Hi all,
Here ia musing BCS example to send a text to to the mail.
but this example is sending acknowledge to the person who sent that the mai is sent to the recipient.
I dont that acknowledge mail for the sender.can anyone help any parameter in the method has to call.
Regards,
MadhaviThere is two way, you could add plugin to see mail from SAP to your Outlook, or you could send mail from sap to a SMTP.
To send mail from SAP to SMTP see transaction SCOT. (if you are running an Unix SAP server, that would be easy)
Regards -
Sending automatic mail using JSP or Servlet
hello,
i was just wondering if anyone out there knows how can automatically send emails to client from my application after receiving thier email address. the email address is received from a form and i want my application to automatically send a structured email to the client as soon as they click the send button. i am using JSP and tomcat as my server. any help will be appreciatedYou must create a class that sends the mail:
A code example would be like this:
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import java.util.*;
public class MailSender {
public void postMail(String smtpsrv, String recipients[], String subject,
String message, String from) throws MessagingException {
boolean debug = false;
//Set the host smtp address
Properties props = new Properties();
props.put("mail.smtp.host", smtpsrv);
// create some properties and get the default Session
Session session = Session.getDefaultInstance(props, null);
session.setDebug(debug);
// create a message
Message msg = new MimeMessage(session);
// set the from and to address
InternetAddress addressFrom = new InternetAddress(from);
msg.setFrom(addressFrom);
InternetAddress[] addressTo = new InternetAddress[recipients.length];
for (int i = 0; i < recipients.length; i++) {
addressTo[i] = new InternetAddress(recipients);
msg.setRecipients(Message.RecipientType.TO, addressTo);
// Setting the Subject and Content Type
msg.setSubject(subject);
msg.setContent(message, "text/html;charset=utf-8");
Transport.send(msg);
You 'll find out that its easy to understand the code.
I advise you not to change this code.
I also include an example of how to right the JSP code:
<%
MailSender MS = new MailSender();
try {
MS.postMail(server, recipient,"Your E-mail Title", "BODY content", from);
} catch (MessagingException e1) {
e1.printStackTrace();
%>
This JSP code follows the pattern of the above class
Hope to help you
Cheers!!! -
RE: (forte-users) send/receive mail
Hi Nat,
you have three possibilities to integrate MAPI to a Forte program:
1. using mapi32.dll (simple MAPI) or mapix32.dll (MAPI). You must integrate
this libraries using a C wrapper class (as described in "Integrating with
External Systems").
2. using OLE Active messaging library ( as described in 'Integrating with
Windows and Macintosh")
3. or implement POP3 using an ExternalConnection class.
Regards,
Zenon Adamek
Forte Developer
Purolator Courier Ltd.
ZAdamekpurolator.com
-----Original Message-----
From: Nat Balasubramaniam [SMTP:NBalasubdcjs.state.ny.us]
Sent: Wednesday, January 26, 2000 2:18 PM
To: Forte-userssagesoln.com
Subject: (forte-users) send/receive mail
Our application needs to send/receive mails from a mail server in NT
environment. Does forte provide SMTP and POP3 protocol support(libraries)
so that we can use external connection class to connect to the server and
send/
receive mails or do we have to use third party controls. Any help would be
appreciated.
For the archives, go to: <a href="http://lists.xpedior.com/forte-users">http://lists.xpedior.com/forte-users</a> and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.comHi,
Unfortunatly, Forte does not provide SMTP and POP3 protocoles.
But, you can use External connections to do it if you need.
You can find a simple SMTP send mail sample code on
http://perso.club-internet.fr/dnguyen/ . The receive should be as easy as the send.
For MIME base 64 encoding and decoding, it should last one or two weeks of coding
(if you need optimization).
One advantage of coding this in Tool directly is the portability.
In your case, on NT, you could also interface with MAPI using for instance the
ActiveX interface.
By that way, you will already have SMTP, POP3 and MIME.
Hope this helps,
Daniel Nguyen
Freelance Forte Consultant
http://perso.club-internet.fr/dnguyen/
edwardsmjwillis.com a écrit:
Hi,
Our Forte development team are currently investigating how we can add internet
mail capabilities to a Forte application. Our application needs to send/receive
mails from a mail server in an NT environment. Does forte provide SMTP and POP3
protocol support (libraries) so that we can use external connection class to
connect to the server and send/ receive mails or do we have to use third party
controls ?.
Any help regarding code examples or third party solutions would be appreciated.
Thanks in advance
Mark J Edwards
Senior Technical Specialist
Willis
Email: edwardsmjwillis.com
The information in this email and in any attachments is confidential and may be
privileged. If you are not the intended recipient, please destroy this message,
delete any copies held on your systems and notify the sender immediately. You
should not retain, copy or use this email for any purpose, nor disclose all or
any part of its content to any other person.
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com -
URL link in send e-mail pl/sql procedure
I have a send e-mail procedure. I am trying to enclose in the body of the message a URL link with parameters from a form, but it is only taking part of it.
for example http://my.link&pid='||pid||'&uid'||uid
it only takes http://my.link
What is the way to do it successfuly?
Thanks,Thanks for your replies. I still did not get it to work. For example if I stick to your solution with :
urlname := 'my.link?pid='||pid||'&uid='||uid;
where should I stick the try this?
I am using a variable called message.
'message: ' 'click on the following link' ||CRLF || urlname
This is is not working. Any clues? Thanks a lot. Jeanne -
Sending e-mails to multiple users at a time
Hi!
I am using weblogic portal 7.0 for personalization. I am using campaign based e-mails for targetting specific customers. I am able to send e-mail through weblogic portal for users when the user logs in. How can I send group e-mails for a specific campaign. For example, if I have to send "virus alert" campaign mail for all our registered customer. I don't want any batch file to be written for this purpose.
I would really appreciate your help.
Thanks
AnandHi Deepak,
The favorites are placed in the "userhome" repository. Take a look at KM Content -> userhome -> for each username -> Favorites, there you'll find links with the favorites. You can simply copy & paste those to the other users, so you don't have to login with each one.
Regards,
Pascal -
Send E-mail Send E-mail question
Hi,
Im trying out the Developers Toolbox and am trying to figure out if its right for me, and have very basic - beginning MySQL and php skills.
The tutorial at http://help.adobe.com/en_US/Dreamweaver/9.0_ADDT/help.html?content=ch12_send_email_01.htm l is rather sketchy, when I follow the tutorial on that page:
"The Send E-mail trigger allows the site developer to automatically send an e-mail when a form is submitted. It is an AFTER trigger, and it can be executed after insert/update/delete/custom transactions.
This trigger is accessible from the Application panel, Server Behaviors > + > Developer Toolbox > Send E-mail > Send E-mail."
well, when I try that, I get an error on the page which says:
"There are no insert, update, custom or login or delete transactions on page. Please insert an appropriate transaction first."
OK I am assuming that I need some kind of an html form open and on a page, however where do I start? Its as if the tutorials left out a huge chunk of the instructions. I realize I am no expert but if someone was buying the toolbox for the first time how would one know where to start? Do I need to create a new database table first? What kind of table? Can it be a table that is part of the site database for the shopping cart database that I already have linked to the store? Or does it need to be a seperate - database, table? Or just a php page with the form in it? Or does the form page need to be .html?
Or is the toolkit only for advanced developers with advanced php and MySQL skills and should I not even bother buying it?
Anyway can someone please give me a hint?
All I am trying to do is construct a simple email form for my web site which I have created in Dreamweaver and I need a php script to process the data inserted into the form and send it off to the mail server to forward to the webmaster's email address. I have the form created and brought up the form page, but then the Server Behaviors > + > Developer Toolbox > Send E-mail > Send E-mail. Tab is not accessible, and I am assuming that it wont be unless I have a .php file open, so I dont have a clue as to where to start.
So Ive got 27 days left to determine if its worth buying the toolbox, if I cant figure it out by then then I guess Ill buy some easier to use extension or stand alone to create my email form and other scripts.Hi DBS,
just some thoughts:
So Ive got 27 days left to determine if its worth buying the toolbox, if I cant figure it out by then then I guess Ill buy some easier to use extension or stand alone to create my email form and other scripts
honestly said: if sending form data via email is about all you want to achieve, buying ADDT or even trying to learn it would be overkill, as it comes with heaps of features which you´ll probably never need -- in this case investing in a stand alone form-to-email script seems a better solution.
Cheers,
Günter Schenk
Adobe Community Expert, Dreamweaver -
Sending a mail from oracle database
Hi,
I have a requirement to send a mail from oracle database.I use UTL_TCP package for this.Although my procedure is executed successfully,i dont get the mails in my inbox.Please help me to figure out a solution.
Thanks in advance....Hi, you must use UTL_SMTP package for send emails, it has more performance and features for debug. You must look the next code, this is a example for send emails.
DECLARE
c UTL_SMTP.CONNECTION;
PROCEDURE send_header(name IN VARCHAR2, header IN VARCHAR2) AS
BEGIN
UTL_SMTP.WRITE_DATA(c, name || ': ' || header || UTL_TCP.CRLF);
END;
BEGIN
c := UTL_SMTP.OPEN_CONNECTION('smtp-server.acme.com');
UTL_SMTP.HELO(c, 'foo.com');
UTL_SMTP.MAIL(c, '[email protected]');
UTL_SMTP.RCPT(c, '[email protected]');
UTL_SMTP.OPEN_DATA(c);
send_header('From', '"Sender" <[email protected]>');
send_header('To', '"Recipient" <[email protected]>');
send_header('Subject', 'Hello');
UTL_SMTP.WRITE_DATA(c, UTL_TCP.CRLF || 'Hello, world!');
UTL_SMTP.CLOSE_DATA(c);
UTL_SMTP.QUIT(c);
EXCEPTION
WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
BEGIN
UTL_SMTP.QUIT(c);
EXCEPTION
WHEN UTL_SMTP.TRANSIENT_ERROR OR UTL_SMTP.PERMANENT_ERROR THEN
NULL; -- When the SMTP server is down or unavailable, we don't have
-- a connection to the server. The QUIT call will raise an
-- exception that we can ignore.
END;
raise_application_error(-20000,
'Failed to send mail due to the following error: ' || sqlerrm);
END;
Also review the next link for get more information about the UTL_SMTP packege.
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_smtp.htm#sthref15587
Regards. -
I'm getting an exception while sending a mail . .
i'm get an excpetion while sending a mail, example i'm getting
this particular error
Exception in thread "main" java.lang.NoClassDefFoundError: javax/activation/DataSource
at MailTest.<init>(MailTest.java:25)
at MailTest.main(MailTest.java:42)
this is my code
pls help me out
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Properties;
import javax.mail.*;
import javax.mail.internet.*;
import javax.naming.Context;
import javax.naming.InitialContext;
public class MailTest
String mailHost = "mail.business-functions.com";
String to = "[email protected]";
String from = "[email protected]";
String subject = "This is Test Mail Thru Java Mail API";
String body = "This is Test Mail to check whether the Java Mail APi is Working or not. This is prototype developed by Snehal K gandhi of Business Functions Software Solutions Pvt Ltd.";
Provider provider;
public MailTest()
try
Properties props = System.getProperties();
props.put("mail.smtp.host", mailHost);
Session session = Session.getInstance(props,null);
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress(from));
message.setRecipients(Message.RecipientType.TO,new InternetAddress[]{new InternetAddress(to)});
message.setSubject(subject);
message.setContent(body, "text/plain");
Transport.send(message);
System.out.println("Mail has been Sent");
catch(MessagingException me)
System.out.println("2. Error While Sending the Mail and the exception is : " + me.toString());
public static void main(String arg[])
new MailTest();
***********************************************************************/<sigh>
You need activation.jar in your classpath and or
import javax.activation.*;
See the JavaMail Readme for more info.
If you haven't got JAF get it here
http://java.sun.com/products/javabeans/glasgow/jaf.html
Rgds,
SH -
Blind copy while sending a mail...
Hi Friends,
How to set a recipient under the blind copy recipient list (BCC) while sending a mail using the function module SO_DOCUMENT_SEND_API1. I have checked the flag <b>blind_copy</b> but not seeing that recipient under the bcc list. Some body please help in this.
Thanx in advance.
RamSee the example program :
TABLES: SOLI.
Data Declarations
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS: SAPID RADIOBUTTON GROUP ADDR,
EMAIL_ID RADIOBUTTON GROUP ADDR.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
SELECT-OPTIONS: ID FOR SOLI-LINE NO INTERVALS.
SELECT-OPTIONS: CC FOR SOLI-LINE NO INTERVALS.
SELECT-OPTIONS: BCC FOR SOLI-LINE NO INTERVALS.
*PARAMETERS: SENDER LIKE SOUD-USRNAM.
SELECTION-SCREEN END OF BLOCK B2.
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-009.
PARAMETERS: SUB_LINE(60) TYPE C.
SELECTION-SCREEN END OF BLOCK B3.
SELECTION-SCREEN BEGIN OF BLOCK B4 WITH FRAME TITLE TEXT-008.
SELECT-OPTIONS: TEXT1 FOR SOLI-LINE NO INTERVALS.
SELECTION-SCREEN END OF BLOCK B4.
SELECTION-SCREEN BEGIN OF BLOCK B5 WITH FRAME TITLE TEXT-009.
SELECTION-SCREEN BEGIN OF LINE.
parameters: P_ATTACH as checkbox.
selection-screen comment 3(30) text-010.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B5.
DATA: MAIL_CONTENT LIKE SOLI OCCURS 0 WITH HEADER LINE,
SUBJECT_LINE LIKE SOOD1-OBJDES.
Start of program processing
START-OF-SELECTION.
Get the Body of the Message from the selection screen or from
calling program
LOOP AT TEXT1.
MOVE TEXT1-LOW TO MAIL_CONTENT-LINE.
APPEND MAIL_CONTENT.
ENDLOOP.
Subject of the Message
MOVE SUB_LINE TO SUBJECT_LINE.
call a routine to send the workflow message
PERFORM SEND_EMAIL
TABLES MAIL_CONTENT
USING SUBJECT_LINE.
*& Form SEND_EMAIL
Send Workflow message
FORM SEND_EMAIL TABLES OBJCONT STRUCTURE MAIL_CONTENT
USING TITLE LIKE SOOD-OBJDES.
DATA: RECEIVERS LIKE SOOS1 OCCURS 0 WITH HEADER LINE,
TSOOD1 LIKE SOOD1,
PACKING_LIST LIKE SOXPL OCCURS 0 WITH HEADER LINE,
OBJCONT1 LIKE MAIL_CONTENT OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF AT_HEADER OCCURS 1.
INCLUDE STRUCTURE SOLI.
DATA: END OF AT_HEADER.
CLEAR: TSOOD1,
RECEIVERS.
REFRESH RECEIVERS.
MOVE: SY-LANGU TO TSOOD1-OBJLA,
'Email Notice' TO TSOOD1-OBJNAM,
'C' TO TSOOD1-OBJSNS,
TITLE TO TSOOD1-OBJDES.
'SCHIAVONIR' TO TSOOD1-OWNNAM.
loop through each ID and move them to recipient table
LOOP AT ID.
TRANSLATE ID-LOW TO UPPER CASE.
IF SAPID = 'X'.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
' ' TO RECEIVERS-RECESC,
ID-LOW TO RECEIVERS-RECNAM,
'X' TO RECEIVERS-SNDEX.
ELSE.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
'U' TO RECEIVERS-RECESC,
'U-' TO RECEIVERS-RECNAM,
ID-LOW TO RECEIVERS-RECEXTNAM.
ENDIF.
APPEND RECEIVERS.
CLEAR RECEIVERS.
ENDLOOP.
loop through each CC and move them to recipient table
LOOP AT CC.
TRANSLATE CC-LOW TO UPPER CASE.
IF SAPID = 'X'.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
' ' TO RECEIVERS-RECESC,
CC-LOW TO RECEIVERS-RECNAM,
'X' TO RECEIVERS-SNDEX,
'X' TO RECEIVERS-SNDCP.
ELSE.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
'U' TO RECEIVERS-RECESC,
'U-' TO RECEIVERS-RECNAM,
CC-LOW TO RECEIVERS-RECEXTNAM,
'X' TO RECEIVERS-SNDCP.
ENDIF.
APPEND RECEIVERS.
CLEAR RECEIVERS.
ENDLOOP.
loop through each BCC and move them to recipient table
LOOP AT BCC.
TRANSLATE BCC-LOW TO UPPER CASE.
IF SAPID = 'X'.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
' ' TO RECEIVERS-RECESC,
BCC-LOW TO RECEIVERS-RECNAM,
'X' TO RECEIVERS-SNDEX,
'X' TO RECEIVERS-SNDBC.
ELSE.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
'U' TO RECEIVERS-RECESC,
'U-' TO RECEIVERS-RECNAM,
BCC-LOW TO RECEIVERS-RECEXTNAM,
'X' TO RECEIVERS-SNDBC.
ENDIF.
APPEND RECEIVERS.
CLEAR RECEIVERS.
ENDLOOP.
AT_HEADER = SY-DATUM.
APPEND AT_HEADER.
AT_HEADER = SY-UZEIT.
APPEND AT_HEADER.
IF SENDER EQ SPACE.
SENDER = SY-UNAME.
ENDIF.
IF P_ATTACH EQ 'X'.
PACKING_LIST-HEAD_START = 1.
PACKING_LIST-HEAD_NUM = 2.
PACKING_LIST-BODY_START = 1.
PACKING_LIST-BODY_NUM = 9999.
PACKING_LIST-FILE_EXT = 'TXT'.
APPEND PACKING_LIST.
CLEAR PACKING_LIST.
APPEND LINES OF OBJCONT TO OBJCONT1.
REFRESH OBJCONT.
ENDIF.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
OBJECT_HD_CHANGE = TSOOD1
OBJECT_TYPE = 'RAW'
TABLES
OBJCONT = OBJCONT
RECEIVERS = RECEIVERS
ATT_HEAD = AT_HEADER
ATT_CONT = OBJCONT1
PACKING_LIST = PACKING_LIST
EXCEPTIONS
ACTIVE_USER_NOT_EXIST = 1
COMMUNICATION_FAILURE = 2
COMPONENT_NOT_AVAILABLE = 3
FOLDER_NOT_EXIST = 4
FOLDER_NO_AUTHORIZATION = 5
FORWARDER_NOT_EXIST = 6
NOTE_NOT_EXIST = 7
OBJECT_NOT_EXIST = 8
OBJECT_NOT_SENT = 9
OBJECT_NO_AUTHORIZATION = 10
OBJECT_TYPE_NOT_EXIST = 11
OPERATION_NO_AUTHORIZATION = 12
OWNER_NOT_EXIST = 13
PARAMETER_ERROR = 14
SUBSTITUTE_NOT_ACTIVE = 15
SUBSTITUTE_NOT_DEFINED = 16
SYSTEM_FAILURE = 17
TOO_MUCH_RECEIVERS = 18
USER_NOT_EXIST = 19
X_ERROR = 20
OTHERS = 21.
ENDFORM. " SEND_EMAIL
text elements
BCC Blind CC
CC Copy to
EMAIL_ID Email ID
ID ?...
P_ATTACH Send as Attachment?
SAPID SAP ID
SUB_LINE Subject
TEXT1 Message -
How to send a mail with rich text content like using outlook
Hi All. I have a serious problem. When we send the mail from
outlook express or yahoo, we can send the mail with the text appearing
in the mail with bold font , with different colors, underlined etc.
If i type this kind of text in any word processor and mail that content through java mail then the message should be received by the recepient with all that bold,color and underlines etc as it is. Can anybody please help me in this case ASAP.Go to this site and download the htmlArea Javascripts. Embedd them in your HTML and it will turn your normal HTML Text Area into Rich Text Area. Your real code will include all HTML tags. For example if you select some text and make it bold , the real HTML output will look like <B>YOUR TEXT </B>. So i guess your recipient should be able to receive HTML contents.
http://www.interactivetools.com/products/htmlarea/ -
I got this problem when I tried to configure out-going email and add an account to farm administrator group.
I configure out-going email according to this website http://technet.microsoft.com/en-us/library/cc288949.aspx
Here are the screen shots.
The SMTP server and email accounts work out OK when I use Outlook 2010 to test.
Anyone can help me about it? Thanks.
Here is the log.
09/20/2012 09:21:00.36 w3wp.exe (0x1F7C)
0x1138
SharePoint Foundation E-Mail
8gsf
High
#160008: The e-mail address 'admin3.sharepoint@domain' contains illegal
characters. df98555c-612f-4a58-9443-ab6e9a4fcc53
09/20/2012 09:21:00.36 w3wp.exe (0x1F7C)
0x1138
SharePoint Foundation General
8kh7 High
Cannot complete this action. Please try again.
df98555c-612f-4a58-9443-ab6e9a4fcc53
09/20/2012 09:21:00.36 w3wp.exe (0x1F7C)
0x1138
SharePoint Foundation E-Mail
7946 Critical
Cannot complete this action. Please try again.
df98555c-612f-4a58-9443-ab6e9a4fcc53
09/20/2012 09:21:00.36 w3wp.exe (0x1F7C)
0x1138
SharePoint Foundation Runtime
tkau Unexpected
Microsoft.SharePoint.SPException: The user or users have been added successfully, but there was an error in sending the e-mail message. The server may not be set up correctly to send e-mail. To verify that e-mail is configured correctly, contact your
server administrator. at Microsoft.SharePoint.ApplicationPages.AclInv.SendEmailInvitation(EntityEditor picker, String subject, String message) at Microsoft.SharePoint.ApplicationPages.AclInv.BtnOK_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String
eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStage...
df98555c-612f-4a58-9443-ab6e9a4fcc53
The e-mail address I have tested it for several times and there is no problem.
Anyone has any clue about this error?Hi.
This I have seen before...
It can be that the SMTP relay server is configured to only allow certain IP ranges or addresses.
It can be that the firewall on the SP server does not allow for SMTP traffic (normally 25, for example for Exchange).
It can be that there is an Antivirus on the SP server(Client AV) that prohobits the Timer service to send email from this server. I have seen MacAfee do this. Needed an policy change.
If, its the builtin SMTP service you are using, check this link:
http://blog.sharepointrx.com/2010/11/18/setting-up-the-iis-smtp-server-for-sending-email-from-sharepoint-2010-on-server-2008-r2/
Check that and try again.
Regards
Thomas Balkeståhl - Technical Specialist - SharePoint -
http://blog.blksthl.com
Download the SharePoint Branding Project here
Download the SharePoint 2010 Site Settings Explained here -
Send a mail if no file in Sender File Adapter
Hello guys,
I have one doubt. I have a sender File adapter with FTP transfer protocol. I want to pull the file every 24 hours. If the file does not exist, there is any way to have an error and send a mail to the client?
Is a requierement to do one interface, they want that XI sends a mail if no file is encounteref in the server when XI goes to pull the file. Is this possible?
Many thanks in advance.
Regards,
Xavi.Hi,
Refer to following link
Read Excel instead of XML through FileAdapter
This has good example of developing module. Only code is available. For further help you can look in Help.sap for crating module they also provide sample code.
No need to call alert from module . go upto 24 hars if no file is received set your own structure.
Give condition in receiver detrmination to send mail if file is not picked.
revert back for any clearity.
Thanks
Sunil Singh -
How to send a mail in webdynpro for abap
Hi experts,
Am working on webdynpro for abap. My requirement is to send a mail to end-user, he 'l fill that form and send it to me back. once I received that mail I 've to convert that pdf into xml and 've to parse that xml file and pass those values to bapi (everything in webdynpro). how can i proceed, its urgent to me. I dont want exact answer jst some inputs to proceed will help to me thank you.I think it's easier to accomplish with workflow.
You can send workitems and receive them. Search sap help for functionality on offline approval, you can use a lot of the functionality of that one.
Regard, Rob Dielemans -
Problem while sending a mail with smtp and ssl
Hi all,
I am new to java mail . I have downloaded one java program to send the mail. I have configured smt and port address.And my System firewall is also in off mode
Still i am unable to send the mail
The following code is my program import java.util.Properties;
import javax.mail.Authenticator;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.URLName;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import com.sun.mail.smtp.SMTPSSLTransport;
To use this program, change values for the following three constants,
SMTP_HOST_NAME -- Has your SMTP Host Name
SMTP_AUTH_USER -- Has your SMTP Authentication UserName
SMTP_AUTH_PWD -- Has your SMTP Authentication Password
Next change values for fields
emailMsgTxt -- Message Text for the Email
emailSubjectTxt -- Subject for email
emailFromAddress -- Email Address whose name will appears as "from" address
Next change value for "emailList".
This String array has List of all Email Addresses to Email Email needs to be sent to.
Next to run the program, execute it as follows,
SendMailUsingAuthentication authProg = new SendMailUsingAuthentication();
public class SendMailUsingAuthentication
//private static final String SMTP_HOST_NAME = "smtp.mail.yahoo.com";
private static final String SMTP_HOST_NAME = "smtp.gmail.com";
private static final String SMTP_AUTH_USER = "admijn.ramd";
private static final String SMTP_AUTH_PWD = "hairamu";
private static final int SMTP_PORT = 465;
private static final String emailMsgTxt = "Online Order Confirmation Message. Also include the Tracking Number.";
private static final String emailSubjectTxt = "Order Confirmation Subject";
private static final String emailFromAddress = "[email protected]";
// Add List of Email address to who email needs to be sent to
private static final String[] emailList = {"[email protected]", "[email protected]"};
public static void main(String args[]) throws Exception
SendMailUsingAuthentication smtpMailSender = new SendMailUsingAuthentication();
smtpMailSender.postMail( emailList, emailSubjectTxt, emailMsgTxt, emailFromAddress);
public void postMail( String recipients[ ], String subject,
String message , String from)
try{
boolean debug = false;
//Set the host smtp address
// Set the host smtp address
Properties props = new Properties();
props.put("mail.transport.protocol", "smtp");
props.put("mail.smtp.port", SMTP_PORT);
props.put("mail.smtp.starttls.enable","true");
props.put("mail.smtp.host", SMTP_HOST_NAME);
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.socketFactory.port", SMTP_PORT);
props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
props.put("mail.smtp.socketFactory.fallback", "false");
SecurityManager security = System.getSecurityManager();
Authenticator auth = new SMTPAuthenticator();
Session session = Session.getDefaultInstance(props, auth);
session.setDebug(debug);
// create a message
Message msg = new MimeMessage(session);
// set the from and to address
InternetAddress addressFrom = new InternetAddress(from);
msg.setFrom(addressFrom);
InternetAddress[] addressTo = new InternetAddress[recipients.length];
for (int i = 0; i < recipients.length; i++) {
addressTo[i] = new InternetAddress(recipients);
msg.setRecipients(Message.RecipientType.TO, addressTo);
// Setting the Subject and Content Type
msg.setText(message);
msg.setSubject(subject);
msg.setContent(message, "text/plain");
Transport.send(msg);
}catch (MessagingException e) {
// TODO: handle exception
e.printStackTrace();
* SimpleAuthenticator is used to do simple authentication
* when the SMTP server requires it.
private class SMTPAuthenticator extends javax.mail.Authenticator
public PasswordAuthentication getPasswordAuthentication()
try{
String username = SMTP_AUTH_USER;
String password = SMTP_AUTH_PWD;
System.out.println("username "+ username+" Password"+password);
return new PasswordAuthentication(username, password);
}catch (Exception e) {
return null;
And i am getting the following exceptions
javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1611)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1369)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)
at javax.mail.Service.connect(Service.java:310)
at javax.mail.Service.connect(Service.java:169)
at javax.mail.Service.connect(Service.java:118)
at javax.mail.Transport.send0(Transport.java:188)
at javax.mail.Transport.send(Transport.java:118)
at com.FutureSoft.org.SendingMail.SendMailUsingAuthentication.postMail(SendMailUsingAuthentication.java:123)
at com.FutureSoft.org.SendingMail.SendMailUsingAuthentication.main(SendMailUsingAuthentication.java:70)
Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:110)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:88)
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1589)
... 9 morehi neuro11
the following code is for sending mail its is working fine in my system, just change the
SMTP_AUTH_USER = "tina.numi"; with u r email user name
SMTP_AUTH_PWD = "abdcde"; u r gmail password
emailFromAddress = "[email protected]"; ur gmail addres
emailList = {"[email protected]"}; receipient list .
and u must sure that u r internet is on and firewall should be off . some times firewall restricts you to communicate with gmail port number
Please make u r firewall off and source code is
package com.FutureSoft.org.SendingMail;
Some SMTP servers require a username and password authentication before you
can use their Server for Sending mail. This is most common with couple
of ISP's who provide SMTP Address to Send Mail.
This Program gives any example on how to do SMTP Authentication
(User and Password verification)
This is a free source code and is provided as it is without any warranties and
it can be used in any your code for free.
Author : Sudhir Ancha
import java.util.Properties;
import javax.mail.Authenticator;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.URLName;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import com.sun.mail.smtp.SMTPSSLTransport;
To use this program, change values for the following three constants,
SMTP_HOST_NAME -- Has your SMTP Host Name
SMTP_AUTH_USER -- Has your SMTP Authentication UserName
SMTP_AUTH_PWD -- Has your SMTP Authentication Password
Next change values for fields
emailMsgTxt -- Message Text for the Email
emailSubjectTxt -- Subject for email
emailFromAddress -- Email Address whose name will appears as "from" address
Next change value for "emailList".
This String array has List of all Email Addresses to Email Email needs to be sent to.
Next to run the program, execute it as follows,
SendMailUsingAuthentication authProg = new SendMailUsingAuthentication();
public class SendMailUsingAuthentication
//private static final String SMTP_HOST_NAME = "smtp.mail.yahoo.com";
private static final String SMTP_HOST_NAME = "smtp.gmail.com";
private static final String SMTP_AUTH_USER = "tina.numi";// gmail username
private static final String SMTP_AUTH_PWD = "abdcde";// gmail password
private static final int SMTP_PORT = 465;
private static final String emailMsgTxt = "Online Order Confirmation Message. Also include the Tracking Number.";
private static final String emailSubjectTxt = "Order Confirmation Subject";
private static final String emailFromAddress = "[email protected]";// gmail id
// Add List of Email address to who email needs to be sent to
private static final String[] emailList = {"[email protected]"};
public static void main(String args[]) throws Exception
SendMailUsingAuthentication smtpMailSender = new SendMailUsingAuthentication();
smtpMailSender.postMail( emailList, emailSubjectTxt, emailMsgTxt, emailFromAddress);
public void postMail( String recipients[ ], String subject,
String message , String from)
try{
boolean debug = false;
//Set the host smtp address
// Set the host smtp address
Properties props = new Properties();
props.put("mail.transport.protocol", "smtp");
props.put("mail.smtp.port", SMTP_PORT);
props.put("mail.smtp.starttls.enable","true");
props.put("mail.smtp.host", SMTP_HOST_NAME);
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.socketFactory.port", SMTP_PORT);
props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
props.put("mail.smtp.socketFactory.fallback", "false");
SecurityManager security = System.getSecurityManager();
Authenticator auth = new SMTPAuthenticator();
Session session = Session.getInstance(props, auth);
session.setDebug(debug);
// create a message
Message msg = new MimeMessage(session);
// set the from and to address
InternetAddress addressFrom = new InternetAddress(from);
msg.setFrom(addressFrom);
InternetAddress[] addressTo = new InternetAddress[recipients.length];
for (int i = 0; i < recipients.length; i++) {
addressTo[i] = new InternetAddress(recipients);
msg.setRecipients(Message.RecipientType.TO, addressTo);
// Setting the Subject and Content Type
msg.setText(message);
msg.setSubject(subject);
msg.setContent(message, "text/plain");
Transport t = session.getTransport("smtps");
try {
t.connect(SMTP_HOST_NAME, SMTP_AUTH_USER, SMTP_AUTH_PWD);
t.sendMessage(msg, msg.getAllRecipients());
catch(Exception e){}
finally
t.close();
}catch (MessagingException e) {
// TODO: handle exception
e.printStackTrace();
* SimpleAuthenticator is used to do simple authentication
* when the SMTP server requires it.
private class SMTPAuthenticator extends javax.mail.Authenticator
public PasswordAuthentication getPasswordAuthentication()
try{
String username = SMTP_AUTH_USER;
String password = SMTP_AUTH_PWD;
System.out.println("username "+ username+" Password"+password);
return new PasswordAuthentication(username, password);
}catch (Exception e) {
return null;
try this . all the best
Maybe you are looking for
-
Itunes wont connect to the internet
After opening itunes and importing a cd, itunes could not connect to the internet to get track names and so forth. The computer is connected to the net and working fine but itunes cannot recognise. The itunes store will not open up either. Any help w
-
Can I use a CDRW like a floppy disc to add tracks in multiple sessions???
I want to burn an mp3 CD in iTunes for my car, but I sometimes want to remove a track or add another. Is this possible? If so, with iTunes? I have Toast Titanium 8 also installed, don't really use as much though. Thanks in advance!
-
Date and time keeps going missing!
Hi everybody, my date and time keeps going missing from the top bar every time I turn on my mac - sometimes other things go missing, like the airport status. It used to happen just once a fortnight but after I installed the latest security update, it
-
I would like to know if there's an extension, or if I need to write a script so that Firefox will stop a redirect to a trap yahoo page, that yahoo causes when I try to access my yahoo mail account. Yahoo redirects from my email page every time I try
-
Print Preview Opens "Save File" Dialog
A week or so ago (possibly related to my install of Snow Leopard, not quite sure), when I hit Preview in a Print dialog, I'm taken to a "Save" dialog before Preview opens with the file for preview. Before it would save it to a temp location somewhere