Mail sending through jsp
ive downloaded the javamail-1.3.3_01 and jaf-1.0.2
ive dont know where to place the mail.jar and activation.jar files
Tomcat 5.0\common\lib
Similar Messages
-
IPhone mail sending through Gmail not pop3?
I have a pop3 account but all email being sent through Gmail. I have deleted my Gmail account and it is still sending through Gmail. How do I get iPhone to stop using Gmail? Is there some new alliance I did not know about.
To change your email address in the mail built in app :
go to settings > mail, contacts, calendars > ( you will find your gmail account under iCloud ) tap on it then top on DELETE ACCOUNT > tap on add account to add your new address -
Is CC possible in Mails sending through ABAP?
Hello All,
My requirement is to send the requirement to MAIL reciepients ..We all know well about this from past ...
But.Can You please let me know is this possible Like putting some one in CC???
Regards
sasHi,
Please check the sample code.Its working fine. You can check the sample code by change the email IDs.
REPORT ztest_subha_mail.
DATA: l_send_request TYPE REF TO cl_bcs, " Send request
l_body TYPE bcsy_text, " Mail body
l_success TYPE bcsy_text, " Atchmnt for success
l_error TYPE bcsy_text, " Atchmnt for error
wa_text TYPE soli, " Work area for attach
l_document TYPE REF TO cl_document_bcs, " Mail body
l_sender TYPE REF TO if_sender_bcs, " Sender address
l_recipient TYPE REF TO if_recipient_bcs, " Recipient
l_size TYPE sood-objlen, " Size of Attachment
l_lines TYPE i, " Lines count
l_email TYPE ad_smtpadr, " Email ID
l_address TYPE bcsy_resv,
wa_address TYPE bcss_resv,
l_extension TYPE soodk-objtp VALUE 'RAW'. " TXT format
Prepare mail bidy
APPEND 'Send multiple file as attachment of a Email commit.' TO l_body.
APPEND space TO l_body.
Preparing contents of attachment with Change Log
Header line
wa_text-line+0 = 'First column'.
wa_text-line+20 = 'Second column'.
wa_text-line+40 = 'Third column'.
wa_text-line+60 = 'Fourth column'.
wa_text-line+80 = 'Fifth column'.
wa_text-line+100 = 'Sixth column'.
wa_text-line+120 = 'Seventh column'.
wa_text-line+140 = 'Eighth column'.
APPEND wa_text TO l_success.
APPEND wa_text TO l_error.
CLEAR : wa_text.
Populate the data part
wa_text-line+0 = '111111111'.
wa_text-line+20 = '222222222'.
wa_text-line+40 = '333333333'.
wa_text-line+60 = '333333333'.
wa_text-line+80 = '444444444'.
wa_text-line+100 = '555555555'.
wa_text-line+120 = '666666666'.
wa_text-line+140 = '777777777'.
APPEND wa_text TO l_success.
CLEAR : wa_text.
wa_text-line+0 = 'aaaaaaaaa'.
wa_text-line+20 = 'bbbbbbbbb'.
wa_text-line+40 = 'ccccccccc'.
wa_text-line+60 = 'ddddddddd'.
wa_text-line+80 = 'eeeeeeeee'.
wa_text-line+100 = 'fffffffff'.
wa_text-line+120 = 'ggggggggg'.
wa_text-line+140 = 'hhhhhhhhh'.
APPEND wa_text TO l_error.
CLEAR : wa_text.
Creates persistent send request
l_send_request = cl_bcs=>create_persistent( ).
Craete document for mail body
l_document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = l_body " Mail body
i_subject = 'Mail send as attachment' ).
Attachment for success records
l_lines = LINES( l_success ).
l_size = l_lines * 255.
Add attchment
CALL METHOD l_document->add_attachment
EXPORTING
i_attachment_type = l_extension
i_attachment_subject = 'Success'
i_attachment_size = l_size
i_att_content_text = l_success. " Attachment for success record
Attachment for error records
l_lines = LINES( l_error ).
l_size = l_lines * 255.
Add attchment
CALL METHOD l_document->add_attachment
EXPORTING
i_attachment_type = l_extension
i_attachment_subject = 'Error'
i_attachment_size = l_size
i_att_content_text = l_error. " Attachment for error record
Add the document to send request
CALL METHOD l_send_request->set_document( l_document ).
Sender addess
l_sender = cl_sapuser_bcs=>create( sy-uname ).
CALL METHOD l_send_request->set_sender
EXPORTING
i_sender = l_sender.
Recipient address
l_email = 'TO'. " NEED TO CHANGE
l_recipient = cl_cam_address_bcs=>create_internet_address( l_email ).
Add recipient address to send request
CALL METHOD l_send_request->add_recipient
EXPORTING
i_recipient = l_recipient
i_express = 'X'
i_copy = ' '
i_blind_copy = ' '
i_no_forward = ' '.
l_email = 'CC'. " NEED TO CHANGE
l_recipient = cl_cam_address_bcs=>create_internet_address( l_email ).
Add recipient address to send request
CALL METHOD l_send_request->add_recipient
EXPORTING
i_recipient = l_recipient
i_express = 'X'
i_copy = 'X'
i_blind_copy = ' '
i_no_forward = ' '.
Trigger E-Mail immediately
l_send_request->set_send_immediately( 'X' ).
Send mail
CALL METHOD l_send_request->send( ).
COMMIT WORK.
Also you can do the same thing using the FM SO_NEW_DOCUMENT_ATT_SEND_API1
Here when you trying to create the Receipient list there for CC you need to check the field SOMLRECI1-COPY.
Thanks
Subhankar
Edited by: Subhankar Garani on Mar 4, 2010 6:46 AM -
Reg: Error in Mail sending through background job in SCOT
Hello experts,
I am trying to schedule a background job through SCOT so as to send the mails present in SOST.
The job is running but it is giving error as "Invalid status for recipient" in SOST.
But when I am sending it directly from SOST it is delivered without any errors. The email address is maintained correctly and SMTP settings are also correct as while sending it directly from SOST it reaches the required recipient without any error.
This error is observed only through background job. I am using program RSCONN01 with variant SAP&CONNECTINT in background job.
Kindly suggest why I am getting the error "Invalid status for recipient" in background job.
Thanks & Regards
Meraz
+91 8894522860I am getting the exact same issue.
were you able to fix this in the last 3 weeks?
thanks. -
CC field in mail sending through work-flow
Hi All,
I have one issue.
I want to send mail through work-flow using sendmail activity.
I can able to send mail also...but for the same mail i want to keep one more person as CC or BCC..
Is there any feature available in work-flow to keep a person in CC or any other solution..
I know this is possible using FM....something other than this...please..
Regards
Ansumesh0000 infotype(actions) run with any reason like separation or long term disabilitymeans
in Actions infotype the both are reasons right are your sure whether these are Actions reasons or action type ?
In that case identify the Code Related to MASSN which is is acton type feild name and action reason is MASSG
and deactivate for those two action type that will suffice the requirement right -
Change in sender name of mail sended through workflow
Hi All,
I have requirement where we want to chage the sender name decription for mails which are going through workflow.When we send mails through send mail step in workflow it is taking sender decription name automatically as "GSAP E1B WORKFLOW SYSTEM".
I have to change this decription to "OSIRIS Invoice". Is there any way to change sender name?
We are using SENDTASKDESCRIPTION method of SELFITEM object in send mail step.
Any help on this regards will be grate help...
Regards,
RahulHello Rahul,
here, the sender's name is the user's name of the background user performing this task, i.e. usually WF-BATCH.
If you do not have any other workflow scenarios running that could interfere here you could possibly just change that user's name.
Otherwise you have to re-program the sendmail step to specifically set the sender description.
Best regards,
Florin
P.S: Workflow issues have a separate forum:
SAP Business Workflow -
Mail sending through proxy client
I have the following simple code to send mail through a SOCKS proxy client:
package com.apna.beans;
import java.util.Properties;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.DataSource;
import javax.activation.FileDataSource;
import javax.activation.DataHandler ;
public class SMail{
public static void main(String[]a){
System.setProperty("proxySet","true");
/*System.getProperties().put("http.proxyPort","25");
System.getProperties().put("http.proxyHost","192.168.0.1");*/
Properties props = System.getProperties();
String msg = "";
// Get system properties
final String username = "vedijitendra";
final String password = "sendmail";
props.put("socksProxyHost", "pc-2");
props.put("socksProxyPort", "1080");
props.put("mail.smtp.host", "smtp.gmail.com");
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.user", username);
props.put("mail.smtp.auth","true"); // this is imp for authorisation.
//props.put("mail.host", "192.168.0.1");
props.put("mail.debug", "true");
props.put("mail.store.protocol", "pop3");
props.put("mail.transport.protocol", "smtp");
try{
//here the authorisation takes place using an Anonymous class.
Session session = Session.getDefaultInstance(props,
new javax.mail.Authenticator (){
protected
javax.mail.PasswordAuthentication
getPasswordAuthentication() {
return new
javax.mail.PasswordAuthentication(username,
password);
// Define message
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress("[email protected]"));
message.addRecipient( Message.RecipientType.TO, new
InternetAddress("[email protected]"));
message.setSubject("Test");
message.setContent("text", "text/html");
// Send the message
Transport.send(message);
msg = "The mail has been sent.";
} catch(Exception e){
e.printStackTrace();
msg = "The mail has not been sent.";
I am able to connect to the GMail's SMTP server.
However, when the Transport. send method is executed, I get:
java.lang.NullPointerException
at com.sun.mail.util.SocketFetcher.startTLS(SocketFetcher.java:242)
at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:1191)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:348)
at javax.mail.Service.connect(Service.java:297)
at javax.mail.Service.connect(Service.java:156)
at javax.mail.Service.connect(Service.java:105)
at javax.mail.Transport.send0(Transport.java:168)
at javax.mail.Transport.send(Transport.java:98)
Any ideas?Send email to [email protected] telling me what version of JavaMail you're
using and what version of the JDK you're using and I'll help you debug this. -
Mail sending through oracle..
Hi,
I wish to send mail through pl/sql .. in oracle 9i.
I know its done using utl_smtp.... but dont know the steps and the required settings.
Please provide me detailed steps.
Thanks.There is an explanation plus a demo here:
http://www.psoug.org/reference/utl_smtp.html
and here:
http://www.oracleutilities.com/Packages/utl_smtp.html
and here:
http://www.revealnet.com/newsletter-v2/smtp.htm
DISCLAIMER These were the first three results on Google for UTL_SMTP
Search is your friend! -
Sending an email through JSP and WML
I am trying to send an email through jsp in wml, i think i have everything set up properly with regards to tomcat however I keep getting the error
"Invalid element 'PCDATA' in context of card expected on event ....."
The line of code in which this occurs is
<jsp:setProperty name="mailer" property="*"/>
I was wondering if anyone would be able to help me with this and be able to tell me why it thinks this is PCDATA and not jsp code.
Any help would be much appreciated.Check out:
http://jakarta.apache.org/taglibs/index.html -
I can no longer receive e-mail messages through my @mac/@me account, though I still seem to be able to send messages. I believe there may have been recent attempts to hack into my Mail account (my LinkedIn and Facebook accounts were both hacked three days ago and a scam/phishing message sent to my contacts, and I know there was at least an attempt made to hack into one of my e-mail accounts). I have already changed my Apple password, but how do I start receiving mail again?
(And I should also say that I'm a little surprised there was no alert from Apple of suspicious activity on my account, if such was the case. Instead, when I logged into my account via Mobile Me three days ago I noticed that all messages in my inbox were gone as well as all of my contacts. I assume this was related to the current problem.)
Thanks for all responses.The problem has been solved with the help of a MobileMe online counsellor. My MobileMe account had in fact been hacked into and the fraudster had been redirecting my e-mail messages to a phony account that he controlled. We took the forward off and reset all my passwords and security questions, which solved the immediate problem.
Thx. -
How to enable send e-mail option through browser window
Hi all,
i need to configure browser enabled e-mail sending option in my sharepoint 2013 site , here is my requirements.....
From Address : Default do not reply e-mail address
To Address : Default my E-mail address
Subject Line - Here is subject line
Body - here i need to enter my message
want to add attachments if possible ,
i have all this options using infopath form , but i need this in browser window ...
am using below code for send through outlook , but i need this with browser enabled and adding default from and to address ...
please help me with this ASAP.
Thanks,
Mani L
Mani LHi Mani,
The A tag using the MailTo: can only work with a client mail program. There's no way to send an e-mail from the server using it.
You can specify Subject and Body texts within the A tag, but you cannot specify the from and to addresses.
In order to send e-mail from the server, you'd need to use either an app-part or custom web part. I don't think you can do it through CSOM.
Paul.
EDIT: It looks like you can do it through C# CSOM, but that would require an AppPart. I can't see SendEmail in any of the JavaScript based CSOM files.
http://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.client.utilities.utility.sendemail(v=office.15).aspx
Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times. -
Mail app malfunctioning, sending through wrong email
I have several emails keychained to my Mail app. I have also been using an email account which I share with several others for work related matters. This particular email is not in my keychain on the app. However, whenever I use the app to send emails, it always automatically sends through this work email. I don't understand why. I make it a point to check which email account I am sending from, but even then it inadvertantly sends from that one particular email.
HELP!First, make sure you have an outgoing mail account corresponding to each of your incoming mail accounts. The user names must match. Then make sure the right outgoing account is selected when you send. You can change the default selection in
Mail > Preferences > Composing > Send new messages from: -
Attaching HTML file and sending through mail
Hi
My Requirement is
I want to attach HTML File and send through mail id's.
But there are number of html files
user can select any one file.
it has to attach and send to the mail id.Hi V,
check the link:
http://wiki.sdn.sap.com/wiki/display/Snippets/SendEmailwithHTMLattachment. -
Report output send through mail
Dear friends,
Looking for sample report to send the report output through external mail on execution.
Regards,
Praveen Lobo*& Report ZKB_EMAIL
REPORT zkb_email NO STANDARD PAGE HEADING LINE-SIZE 200.
TABLES: ekko.
PARAMETERS: p_email TYPE somlreci1-receiver
DEFAULT '<b>WRITE EMAIL ID EG [email protected]'</b>.
Output Table
TYPES: BEGIN OF t_ekpo,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
END OF t_ekpo.
DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
wa_ekpo TYPE t_ekpo.
TYPES: BEGIN OF t_charekpo,
ebeln(10) TYPE c,
ebelp(5) TYPE c,
aedat(8) TYPE c,
matnr(18) TYPE c,
END OF t_charekpo.
DATA: wa_charekpo TYPE t_charekpo.
Mail Parameters
DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
w_cnt TYPE i,
w_sent_all(1) TYPE c,
w_doc_data LIKE sodocchgi1,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
*START_OF_SELECTION
START-OF-SELECTION.
Retrieve sample data from table ekpo
PERFORM data_retrieval.
Populate table with detaisl to be entered into .xls file
PERFORM build_xls_data_table.
*END-OF-SELECTION
END-OF-SELECTION.
Populate message body text
PERFORM populate_email_message_body.
Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment TABLES it_message it_attach
USING p_email 'Example .xls documnet attachment' 'XLS' 'filename'
CHANGING gd_error
gd_reciever.
Instructs mail send program for SAPCONNECT to send email(rsconn01)
PERFORM initiate_mail_execute_program.
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
SELECT ebeln ebelp aedat matnr
UP TO 10 ROWS
FROM ekpo
INTO TABLE it_ekpo.
ENDFORM. " DATA_RETRIEVAL
*& Form BUILD_XLS_DATA_TABLE
Build data table for .xls document
FORM build_xls_data_table.
CONSTANTS: con_cret TYPE x VALUE '0D', "OK for non Unicode
con_tab TYPE x VALUE '09'. "OK for non Unicode
*If you have Unicode check active in program attributes thnen you will
*need to declare constants as follows
*class cl_abap_char_utilities definition load.
*constants:
con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
con_cret type c value cl_abap_char_utilities=>CR_LF.
CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR' INTO it_attach SEPARATED BY space.
CONCATENATE space it_attach INTO it_attach.
APPEND it_attach.
LOOP AT it_ekpo INTO wa_charekpo.
CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
wa_charekpo-aedat wa_charekpo-matnr
INTO it_attach SEPARATED BY space .
CONCATENATE space it_attach INTO it_attach.
APPEND it_attach.
ENDLOOP.
ENDFORM. " BUILD_XLS_DATA_TABLE
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
Send email
FORM send_file_as_email_attachment TABLES pit_message
pit_attach
USING p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
CHANGING p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
Fill the document data.
w_doc_data-doc_size = 1.
Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
w_doc_data-skip_scren = 'X'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = pit_attach[].
Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
APPEND t_receivers.
CLEAR t_receivers.
t_receivers-receiver = sy-uname. " replace with <login name>
t_receivers-rec_type = 'B'.
t_receivers-express = 'X'.
APPEND t_receivers.
CLEAR t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
Populate zerror return code
ld_error = sy-subrc.
Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM. "SEND_FILE_AS_EMAIL_ATTACHMENT
*& Form INITIATE_MAIL_EXECUTE_PROGRAM
Instructs mail send program for SAPCONNECT to send email.
FORM initiate_mail_execute_program.
WAIT UP TO 2 SECONDS.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
*& Form POPULATE_EMAIL_MESSAGE_BODY
Populate message body text
FORM populate_email_message_body.
REFRESH it_message.
it_message = 'Please find attached a list test ekpo records'.
APPEND it_message.
ENDFORM. " POPULATE_EMAIL_MESSAGE_BODY
Rewards if useful.............
Minal -
Recieve Mail from Yahoo, Send through Gmail
I have it setup so I can receive mail through AOL (my gmail is forwarded to aol which my iPhone then receives). Then I send through google's smtp server. No one ever knows it exists. What I would really like to do is receive through yahoo email (push) and then send through gmail. How can I accomplish that. I can not seem to find yahoo's imap server information.
I would have your gmail forwarded to yahoo. Then set up your iphone using "other" when you add an account. The incoming server is: smtp.att.yahoo.com. The outgoing is gmail. And you can put in the field whatever email address you want for others to see!
Maybe you are looking for
-
How do you get your imessage to activate
How do you get your imessage to activate on your phone number and not your email
-
How to create a clipping path in PE12
I work in Photoshop but am helping a client who has only Elements 12, which I know nothing about other than what looks like PS features. We want to create a clipping PATH around part of a photo and save the photo as a JPG so that type wraps around it
-
Accessing anonymous user in web dynpro application
Hi All, I have created one web dynpro application for internet site (Anonymous user). While trying to retrieve the Iuser through web dynpro application, it is coming <b>null</b> coz user is Anonymous if i am not wrong. So I am not able to read the
-
Hi I have created the EWT Tax Types and Codes for Service Tax for GTA and maintain formulae also for the same. Now the vendors subjected to GTA are also subject to TDS. for us, service tax is an expense, so the accouning entry happens as: Service Tax
-
Batch change color of existing highlights in a PDF (Acrobat X Pro)
I'm trying to find a script or action that will batch change the color of some existing text highlights in a PDF. The document shows the text being highlighted, but the highlight color is extremely light such that it is visable only with unnecessary