How to send mail with cc and attachment
please provide code for sending a file with attchment in cc also
HI Rajesh,
There is a standard structure for Receiver Mail adopter which we can get from SAP market Place but it is not provided with CC if u want to use CC then you have to go with Dynamic Configuration.
DynamicConfiguration configuration = (DynamicConfiguration) container.getTransformationParameters().getStreamTransformationConstants.DYNAMIC_CONFIGURATION);
/*any other required fields*/
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Mail", "THeaderCC");
configuration.put(key, "ccemail @ test.com");
Regards
Praveen Reddy
Edited by: Maareddy Praveen Reddy on Aug 10, 2011 12:17 PM
Similar Messages
-
How to send mail with attachment
Hi,
How to send mail with word document as attachment in oracle pl/sql.
kindly help me .
thank you
regards
P Prakashcreate or replace procedure pdf_mail(
p_sender varchar2, -- sender, example: 'Me <[email protected]>'
p_recipients varchar2, -- recipients, example: 'Someone <[email protected]>'
p_subject varchar2, -- subject
p_text varchar2, -- text
p_filename varchar2, -- name of pdf file
p_blob blob -- pdf file
) is
conn utl_smtp.connection;
i number;
len number;
BEGIN
conn := demo_mail.begin_mail(
sender => p_sender,
recipients => p_recipients,
subject => p_subject,
mime_type => demo_mail.MULTIPART_MIME_TYPE);
demo_mail.begin_attachment(
conn => conn,
mime_type => 'application/pdf',
inline => TRUE,
filename => p_filename,
transfer_enc => 'base64');
-- split the Base64 encoded attachment into multiple lines
i := 1;
len := DBMS_LOB.getLength(p_blob);
WHILE (i < len) LOOP
IF(i + demo_mail.MAX_BASE64_LINE_WIDTH < len)THEN
UTL_SMTP.Write_Raw_Data (conn
, UTL_ENCODE.Base64_Encode(
DBMS_LOB.Substr(p_blob, demo_mail.MAX_BASE64_LINE_WIDTH, i)));
ELSE
UTL_SMTP.Write_Raw_Data (conn
, UTL_ENCODE.Base64_Encode(
DBMS_LOB.Substr(p_blob, (len - i)+1, i)));
END IF;
UTL_SMTP.Write_Data(conn, UTL_TCP.CRLF);
i := i + demo_mail.MAX_BASE64_LINE_WIDTH;
END LOOP;
demo_mail.end_attachment(conn => conn);
demo_mail.attach_text(
conn => conn,
data => p_text,
mime_type => 'text/html');
demo_mail.end_mail( conn => conn );
END;
ref:
http://www.plpdf.com/23-1725.html
Edited by: Mahanam on Jan 9, 2011 10:32 PM -
How to send Email with Cc and Bcc using MailPackage
Hi ,
we are using Mail Package to send the Email using Mail Adapter.We have a requirement where we need to send Email with Cc and Bcc using Mail Package .
Can we send Cc and Bcc using Mail Package ?
Thanks
Rajesh .HI Rajesh,
There is a standard structure for Receiver Mail adopter which we can get from SAP market Place but it is not provided with CC if u want to use CC then you have to go with Dynamic Configuration.
DynamicConfiguration configuration = (DynamicConfiguration) container.getTransformationParameters().getStreamTransformationConstants.DYNAMIC_CONFIGURATION);
/*any other required fields*/
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Mail", "THeaderCC");
configuration.put(key, "ccemail @ test.com");
Regards
Praveen Reddy
Edited by: Maareddy Praveen Reddy on Aug 10, 2011 12:17 PM -
How to send mail with attachments - ALBPM 5.7
Hi All,
I am new to BPM,
Someone could help giving me a example of Send Mail with attachments in Aqualogic Studio 5.7?
thanks,
Renatanombrefichero="C:\\Temp\\test.doc"
subject as String="Subject"
message as String="Message"
mailAttachment = Fuego.Net.MailAttachment(source : BinaryFile.readToBinaryFrom(name : nombrefichero), fileName : "test2.doc")
mailAttachments[0] = mailAttachment
correo as Mail
correo.attachments = mailAttachments
correo.contentType = "text/html"
send correo
using from = "[email protected]",
recipient = "[email protected]",
subject = subject,
message = message -
How to send mail with out attachment in a report using oops concept
Hi Abap Experts,
My requirement is i have to send a mail with out attaching any documents this is a report using oops conceopt how can i acheive it .Hi Saeed,
Please search SDN before posting. There are so may threads for the same.
Check out the standard reports--
bcs_example_1, bcs_example_2, .. bcs_example_7
Howard -
Send Mail with xls AND pdf as attachment
Hi there!
I would lke to write a little program, which is able to send a xls-file AND a pdf-file within one mail.
xls alone is already working fine, I'm using the method add_attachment of the class cl_document_bcs. But now I also want to add a pdf-File to this mail. The pdf file is on the local disk, so I'm uploading it via 'GUI_UPLOAD'. But now I have a problem because I don't know how I am able to add this to the mail.
I hope you can help me!!
Greetings,
littlesamHi,
here a short extract:
DATA: IT_BIN TYPE SOLIX_TAB.
DATA: WA_BIN TYPE SOLIX.
DATA: IT_LENGHT TYPE SO_OBJ_LEN.
DATA: N10(10) TYPE N.
DATA: DOCUMENT TYPE REF TO CL_DOCUMENT_BCS.
DATA: WA_BCS TYPE REF TO CX_BCS.
DATA: ATT_TYPE TYPE SOODK-OBJTP.
DATA: SUBJECT TYPE SO_OBJ_DES.
DATA: P_FILE LIKE RLGRAP-FILENAME VALUE 'C:\TEST.PDF'.
DATA: FILE_NAME TYPE STRING.
DATA: FILE_PATH LIKE PCFILE-PATH.
*UPLOAD
FILE_NAME = P_FILE.
FILE_PATH = P_FILE.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
EXPORTING
FILENAME = FILE_NAME
FILETYPE = 'BIN'
CHANGING
DATA_TAB = IT_BIN[].
CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
EXPORTING
COMPLETE_FILENAME = FILE_PATH
IMPORTING
EXTENSION = ATT_TYPE
NAME = SUBJECT.
* ATTACHMENT
DESCRIBE TABLE IT_BIN LINES N10.
READ TABLE IT_BIN INDEX N10 INTO WA_BIN.
N10 = ( N10 - 1 ) * 255 + STRLEN( WA_BIN ).
IT_LENGHT = N10.
TRY.
CALL METHOD DOCUMENT->ADD_ATTACHMENT
EXPORTING
I_ATTACHMENT_TYPE = ATT_TYPE
I_ATT_CONTENT_HEX = IT_BIN
I_ATTACHMENT_SIZE = IT_LENGHT
I_ATTACHMENT_SUBJECT = SUBJECT.
* Error abfangen
CATCH CX_BCS INTO WA_BCS.
WRITE: 'Fehler aufgetreten.'(001).
WRITE: 'Fehlertyp:'(002), WA_BCS->ERROR_TYPE.
EXIT.
ENDTRY.
You can use it for every local file
Hope it helps.
regards, Dieter -
How to Send mail with an attachment of html file?
Hi all,
i am using Oracle 11g Database R1 on Windows 2003 Server R2. I am using the below script for sending a mail with an attachment
declare
vInHandle utl_file.file_type;
flen number;
bsize number;
ex boolean;
l_Output raw(32767);
fname varchar2(30) := 'TEXT.TXT';
vSender varchar2(30) := '[email protected]';
vRecip varchar2(30) := '[email protected]';
vSubj varchar2(50) := 'Weekly Invoice Report';
vAttach varchar2(50) := 'TEXT.TXT';
vMType varchar2(30) := 'Content-type: text / html';
begin
utl_file.fgetattr('ORALOAD', fname, ex, flen, bsize);
vInHandle := utl_file.fopen('ORALOAD', fname, 'R');
utl_file.get_raw (vInHandle, l_Output);
utl_file.fclose(vInHandle);
utl_mail.send_attach_raw(sender => vSender
,recipients => vRecip
,subject => vsubj
,attachment => l_Output
,att_inline => false
,att_filename => fname);
end;
this Script is Working Fine for text based file only. but i want to send a html file from oracle directory. is it possible? .... Please Advice me... if it possible please provide a sample code or any Link Related to this.
Thank You So Much for Your Help
Shanif it possible please provide a sample code or any Link Related to this.Perhaps the maildemo is of use to you, read more threads about it's use here:
http://forums.oracle.com/forums/search.jspa?objID=f75&q=maildemo
OTN code sample link:
https://codesamples.samplecode.oracle.com/servlets/tracking?id=S516 -
How to send mail with attachment through SCSM 2012
Dear All,
I need to send mail to the end user with file attachment, as the user cannot download any attachments from the portal, Please support....
Thanks,
Kalpankur PandeyHello Kalpankur,
I just came across a same kind of thread about this subject. A way to workaround this is the use of Orchestrator:
http://social.technet.microsoft.com/Forums/en-US/systemcenterservicemanager/thread/6a9e933f-291a-438a-a771-f067bb132a24/
Hope this helps a bit
- Dennis | Netherlands | Blog |
Twitter -
Sending mail with PDF file attachment ?
Hi All,
I have scenario File ---> Mail, monitoring FTP directory for PDF file and sending using mail attachment.
At the moment i am using JAVA mapping to construct the mail package structure follow all the step in this blog : XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping
it is working if i am using text file but then how to encode the pdf content so i can send throught the mail adapter. ?
Thank you and Best Regards
FernandHi,
Actually, i am using this java code below :
try {
// create XML structure of mail package
String output = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+ "<ns:Mail xmlns:ns=\"http://sap.com/xi/XI/Mail/30\">"
+ "<Subject>" + mailSubject + "</Subject>"
+ "<From>" + mailSender + "</From>"
+ "<To>" + mailReceiver + "</To>"
+ "<Content_Type>multipart/mixed; boundary=\"" + boundary + "\"</Content_Type>"
+ "<Content>";
out.write(output.getBytes());
// create the declaration of the MIME parts
//First part
output = "--" + boundary + CRLF
+ "Content-Type: text/plain; charset=UTF-8" + CRLF
//+ "Content-Transfer-Encoding: 8bit" + CRLF
+ "Content-Disposition: inline" + CRLF + CRLF
+ mailContent + CRLF
//Second part
+ "--" + boundary + CRLF
+ "Content-Type: Application/pdf; name=" + attachmentName + CRLF
//+ "Content-Transfer-Encoding: base64" + CRLF
+ "Content-Disposition: attachment; filename=" + attachmentName + CRLF + CRLF;
out.write(output.getBytes());
//Source is taken as attachment
copySource(in, out);
out.write("</Content></ns:Mail>".getBytes());
} catch (IOException e) {
throw new StreamTransformationException(e.getMessage());
protected static void copySource(InputStream in, OutputStream out)
throws IOException {
byte[] bbuf = new byte[in.available()];
int bblen = in.read(bbuf);
if (!(bblen < 0)) {
//String sbuf = new String(bbuf);
//String encoded = Base64.encode(sbuf);
// replace all control characters with escape sequences
//sbuf = sbuf.replaceAll("&", "&");
//sbuf = sbuf.replaceAll("\"", """);
//sbuf = sbuf.replaceAll("'", "'");
//sbuf = sbuf.replaceAll("<", "<");
//sbuf = sbuf.replaceAll(">", ">");
out.write(bbuf);
This code working fine with text file but not for pdf file. because i got error in mail adapter :
Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: com.sap.aii.messaging.util.XMLScanException: java.lang.NullPointerException; nested exception caused by: com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Unsupported character: 8f(:main:, row:11, col:4)(:main:, row=11, col=4) -> com.sap.engine.lib.xml.parser.ParserException: Unsupported character: 8f(:main:, row:11, col:4)
I guest the problem because the mail adapter doen't accept pdf content insite the mail package.
please advise me
Best Regards
Fernand -
SEND EMAIL WITH PO AND ATTACHMENT FILES
Hi,
I'm working with MySAP Enterprise 4.7 and I want to send the PO and its attachment vía e-mail, currently only the PO is being sent to the Vendor and the attachment only appears like texts into the "body" of PO. Is there some way to send e-mail with the PO and attachments at the same time??
I attached the document via DMS at position level.
Thanks in advanced for your answer and help!!
Regards,
Blanca Reyeshi
Follow these steps
Basically there are two mail types: Internet mail (external mail) and
SAPOffice mail.
Mail is sent via the output determination in both cases.
If you use the external mail, the message for the purchasing document is
converted into a corresponding text file which is sent to the vendor via
the Internet.
SAPOffice mail is sent only within the R/3 System and has mainly the
function of providing information.
In particular, it is not possible to attach a message (form) for a
purchasing document to a SAPOffice mail.
When using external mail, the following basic settings are required:
1. You must maintain an e-mail address in the address in the vendor
master.
2. The same applies to your own user master. You also have to specify
an e-mail address there in order to identify the sender.
o Note that it is not possible to change the e-mail address of the endor
o You can use a temporary email address in Transaction ME21N.
3. For the output type for default values, a communication strategy
needs to be maintained in the Customizing that supports the e-mail.
You can find the definition of the communication strategy in the
Customizing via the following path: (SPRO -> IMG -> SAP Web
Application Server -> Basic Services -> Message Control -> Define
Communication Strategy). As a default, communication strategy CS01
is delivered. This already contains the necessary entry for the
external communication. Bear in mind that without a suitable
communication strategy it is not possible to communicate with a
partner via Medium 5 (external sending).
4. Use the standard SAP environment (program 'SAPFM06P', FORM routine
'ENTRY_NEU' and form 'MEDRUCK') as the processing routines.
5. In the condition records for the output type (for example,
Transaction MN04), use medium '5' (External send).
6. You can use Transaction SCOT to trigger the output manually. The
prerequisite for a correct sending is that the node is set
correctly. This is not described here, but it must have already been
carried out.
7. To be able to display, for example, the e-mail in Outlook, enter PDF
as the format in the node.
To use the SAPOffice mail, the following basic settings are required:
1. For the output type for default values, a communication strategy
needs to be maintained in the Customizing that supports the e-mail.
You can branch to the maintenance of the communication strategy via
the input help.
2. Use the SAP standard environment (program "RSNASTSO" and FORM
routine "SAPOFFICE_AUFRUF") as the processing routines.
3. In the condition records for the output type (for example,
Transaction MN04), use medium '7' (SAPOffice) and also partner role
'MP' (mail partner).
Additional settings:
Problem:
How can you both change the mail title and text for the sending of a
mail message and maintain a replacement parameter, for example a
document number.
Solution:
1. The replacement routine is maintained in the Customizing for the
output type in the detail screen on the 'General data' tab under
'Replacement of text symbols' (for Release < 4.6B, this can be found
on the 'Mail' tab page).
Program: SAPMM06E
FORM routine: TEXT_SYMBOL_REPLACE
2. Maintain mail title and text.
o If you want to send a purchase order within an R/3 system using
the SAP office, you can maintain both the mail title ('Re:') and
also a mail text in the Customizing for the output type To do
this, select the directory mail title and text for the
corresponding message type.
o If you want to send a purchase order as (external) mail, for
example, to a vendor, you have to maintain the mail title in the
condition record for the output type (for example in Transaction
MN05) on the 'Communication method' tab page. Enter the mail
title in the 'Text for cover page' field. You cannot maintain an
additional mail text.
o Note that the values from the mail title are used to create the
description for the attachment.
3. The replacement parameters must be enclosed by &. Example: You want
to enter the title 'PO number '. For this you have to enter
the following in the Document Title field (Message Customizing ->
sub-option: Mail title and texts) 'PO number &EKKO-EBELN&'
Reward points if helpful
regards
chetan -
Sending mail with Cc and copy in sent message box
Since I have the last OS X 10.6.6 update, I dont receive anymore the Cc copy which I send to myself
and have only the copy of the sent message in the sent box (messages envoyés)
Similarly I cannot send a mail to myself as a verification process of my external mail provider. The copy is stored in the sent copy box, but it doesnt arrive in the in box (boite de reception)
How can I get back to the former situation in which I could send copies to myself or send mail to myself
Thanks for any hint
ClaudeThe first exception is this:
http://java.sun.com/products/javamail/FAQ.html#norelay
The second exception is probably due to a configuration error
on the client. Turn on session debugging and the protocol
trace will give some clues about what's wrong with the HELO
command. -
Problem in sending mail with a xls attachment
Hi,
I have a problem in a program that I created.
The program sends a email via internet to user with a excel attachment.
In SOST its showing as a file with .xls attachment which opens in MS excel.
But the actual mail which the user gets is a .dat file
what can be the reason
Edited by: ANURAG GOGOI on Oct 23, 2008 1:55 PMAnurag:
You need to set the DOC_TYPE value to 'XLS' in the packing List header (structure SOPCKLSTI1).
Note: The 'XLS' value isn't listed as a possible value in the domain value list for DOC_TYPE, but it will be allowed.
Regards,
D. -
Hi all,
I have a pdf file which i got it by coverting the smart form using OTF covert Funciton module..am using this fn module to convert 132 lines to 255 lines,
CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
EXPORTING
LINE_WIDTH_SRC =
LINE_WIDTH_DST = '255'
TRANSFER_BIN = ' '
TABLES
CONTENT_IN = it_pdfdata[]
CONTENT_OUT = it_pdf[]
my it_pdf[], it_pdfdata[] contains data ,
clear wa_objpack-TRANSF_BIN.
wa_objpack-head_start = 1.
wa_objpack-head_num = 0.
wa_objpack-body_start = 1.
wa_objpack-body_num = tab_lines.
wa_objpack-doc_type = 'RAW'.
append wa_objpack to objpack.
wa_objpack-transf_bin = 'X'.
wa_objpack-head_start = 1.
wa_objpack-head_num = 1.
wa_objpack-body_start = 1.
wa_objpack-body_num = tab_lines.
wa_objpack-doc_type = 'PDF'.
wa_objpack-OBJ_NAME = "test".
wa_objpack-OBJ_DESCR = "test".
wa_objpack-doc_size = tab_lines.
append wa_objpack to objpack.
*LOOP AT it_pdfdata INTO WA_PDFDATA.
loop at it_email into wa_email.
* e-mail receivers.
loop at gi_header into wa_header.
SELECT mailid FROM ZPY_MAILID INTO wa_email
WHERE EMPNO = wa_header-Pernr.
gv_email = wa_email.
endselect.
wa_rec-receiver = gv_email.
wa_rec-rec_type = 'U'.
wa_rec-notif_ndel = 'X'.
APPEND wa_rec to it_rec.
APPEND wa_email TO it_email.
endloop.
These are the stmts i am using, and my FM to send email is
\CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = doc_chg
PUT_IN_OUTBOX = ' '
SENDER_ADDRESS = sender
SENDER_ADDRESS_TYPE = sender_type
COMMIT_WORK = 'X'
TABLES
PACKING_LIST = objpack
CONTENTS_BIN = objbin
CONTENTS_TXT = objtxt
CONTENTS_HEX =
OBJECT_PARA =
OBJECT_PARB =
RECEIVERS = it_rec
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
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
it is showing run time error...
Please help me to go ahead ....Hi!
Instead of putting such a lengthy code, its better to use the std functionality available with smartforms. In the interface for your smartform FM, use the parameters MAIL_SENDER, MAIL_RECIPIENT, CONTROL_PARAMETERS (DEVICE as 'MAIL' and no_dialog = 'X'). No conversion from OTF to PDF etc is required.
Use the below code to populate the Sender and receiver mail ids:
DATA GV_SENDER TYPE SWC_OBJECT.
DATA GV_SENDER_ID LIKE SWOTOBJID.
DATA GV_RECEIVER TYPE SWC_OBJECT.
DATA GV_RECEIVER_ID LIKE SWOTOBJID.
SWC_CONTAINER LT_CONTAINER.
*reset data for CTCV
CALL FUNCTION 'CTCV_INIT_USER_DATA'.
*Create sender using sender mail address from new table
SWC_CLEAR_CONTAINER LT_CONTAINER.
SWC_CREATE_OBJECT GV_SENDER 'RECIPIENT' SPACE.
SWC_SET_ELEMENT LT_CONTAINER 'AddressString'
zmail-sender.
SWC_SET_ELEMENT LT_CONTAINER 'TypeID' 'B'.
SWC_CALL_METHOD GV_SENDER 'CreateAddress' LT_CONTAINER.
IF SY-SUBRC NE 0.
MESSAGE ID SY-MSGID TYPE 'E' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
RAISING SENDER_CREATION_FAILED.
ENDIF.
SWC_OBJECT_TO_PERSISTENT GV_SENDER GV_SENDER_ID.
Similarly you can create the recipient mail id.
SWC_CLEAR_CONTAINER LT_CONTAINER.
SWC_CREATE_OBJECT GV_RECEIVER 'RECIPIENT' SPACE.
SWC_SET_ELEMENT LT_CONTAINER 'AddressString'
adr6-smtp_addr.
SWC_SET_ELEMENT LT_CONTAINER 'TypeID' 'U'.
SWC_CALL_METHOD GV_RECEIVER 'CreateAddress' LT_CONTAINER.
IF SY-SUBRC NE 0.
MESSAGE ID SY-MSGID TYPE 'E' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
RAISING SENDER_CREATION_FAILED.
ENDIF.
SWC_OBJECT_TO_PERSISTENT GV_RECEIVER GV_RECEIVER_ID.
endif.
This will save a lot of effort and make life easier.
Hope this helps.
Cheers! -
How to send mails to "CC" and "BCC" using receiver mail adapter dynamically
Hi,
Due to business requirement PI need to send mails dynamically to u201CCCu201D and u201CBCCu201D using receiver mail adapter.
We have an option to send mails to u201CTou201D dynamically, but are there any option to send mails u201CCCu201D and u201CBCCu201D dynamically.
Please some help to resolve the issue. Thanks
Regards,
Sreeramulu Konjeti.Hi Sreeramulu,
As mentioned by Lucas, you can use the UDF. Inn addition to that, you need to define the Variable Headers under Variable transport binding after enabling the Adapter Specific Message Attributes.
For the Enabling ASMA, follow the below steps and check for the variable attributes.
Select the Advanced tab page.
To save adapter-specific attributes in the message header of the XI message, select Use Adapter-Specific Message Attributes and Variable Transport Binding.
The following attributes in the message header are then available for processing:
○ User: (technical name: TServerLocation)
○ Authentication key: (technical name: TAuthKey)
The following mail header fields are available for processing:
○ From: (technical name: THeaderFROM)
○ To: (technical name: THeaderTO)
○ Cc: (technical name: THeaderCC)
○ Bcc: (technical name: THeaderBCC)
○ Subject: (technical name: THeaderSUBJECT)
○ Reference to the mail that is to be replied to: (technical name: THeaderIN-REPLY-TO)
○ Reply to: (technical name: THeaderREPLY-TO)
○ Mail client program: (technical name: THeaderX-MAILER)
○ Send confirmation of receipt: (technical name: THeaderDISPOSITION-NOTIFICATION-TO)
○ Priority: (technical name: THeaderPRIORITY)
○ Importance of message: (technical name: THeaderIMPORTANCE)
To transfer further header fields, set the relevant indicator for Variable Header. The technical names for the fields are XHeaderName1, XHeaderName2, and XHeaderName3.
The parameters are included in the mail header under the names specified here.
The attribute namespace for the adapter is http://sap.com/xi/XI/System/Mail.
Thanks, -
Problem sending mail with SMTP and SSL
Hi,
I am trying to send mail using JavaMail 1.4/jdk1.5 using ssl. I save the certificate by going into IE and exporting the certificate and added the certificate using the keytool to ${JAVA_HOME}/jre/lib/security/cacerts.I have also added this in the code using
System.setProperty("javax.net.ssl.trustStore","${JAVA_HOME}/jre/lib/security/cacerts");But I am still getting the following error.
DEBUG SMTP: trying to connect to host "XXXX", port 465, isSSL true
DEBUG SMTP: exception reading response: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
Exception in thread "main" javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1462)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1260)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
at javax.mail.Service.connect(Service.java:275)
at glycomics.common.util.SendMailUsingAuthentication.postMail(Unknown Source)
at glycomics.common.util.SendMailUsingAuthentication.main(Unknown Source)
Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:166)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1518)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1485)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1468)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1394)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:86)
at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:97)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:75)
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1440)
... 5 more
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:56)
at sun.security.validator.Validator.getInstance(Validator.java:146)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:105)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:167)
at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(SSLContextImpl.java:320)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:841)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:106)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:433)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:818)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1030)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:678)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
... 10 more
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:183)
at java.security.cert.PKIXParameters.<init>(PKIXParameters.java:103)
at java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:87)
at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:54)Has anybody faced similar problem??Any suggestions??
TIA
M
Message was edited by:
c@de-m@nkeySee SSLNOTES.txt and the JavaMail FAQ for debugging hints.
If you turn on all the debugging output and still can't figure it out,
you'll probably need to ask in some Java security forum. The
problem is occurring when making the connection using SSLSocket,
before any JavaMail code comes into play.
Maybe you are looking for
-
KMODE_EXCEPTION_NOT_HANDLED in Windows 8.1
I recently downloaded an official copy of Windows 8.1 from my school's official Dreamspark partnership. After installing Windows 8.1 and following the steps fully I had no issues for about half a day, however after I put my MacBook Pro to sleep I cou
-
My Zen Mozaic turns on and switches off
I've got a zen mozaic 4gb and all of a sudden it started turning on by itself, and turning off. I uploaded the firmware again and i did reset al the settings as well, but it's still doing that. What else should I do?
-
How do i get my iPhone to show up in the share section in maps on Mavericks
I go to the share on maps and i don't see my Iphone 5s. How can I get it to appear?
-
How to make an entire Oracle Schema View Only ?
Lets say I have a schema called "scott" in oracle database. Now I created a new user called "john". I wanted "john" user to fully access "scott" schema in view only mode. Can this be done easily, if YES how. Please give me the steps.
-
I am running an Xserve, OS 104.11. Straight POSIX permissions, nothing fancy, not using ACLS. For some reason clients can't open files from the server or even copy them to their desktop. I need to keep the files read only, with the exception of the p