Send an email with 2 Attachments .....
Hi Gurus ,
I made an report that takes an otf and make it as PDF and send it as email.If i run the report it runs ok .
My problem is that i want to attach 2 files more to that email that exist already in my Disk. For example An excel document and a Txt document.
I want this to happen automatically without the user must have to choose the files .
Thanks a lot ....
Points will be rewarded !!!!!
Hi,
I have worked on a similar requirement recently but i have attached two .xls files you can edit the code according to your reqirement.
REPORT ZDOC_AS_EMAIL_3.
*& Report ZEMAIL_ATTACH *
*& Example of sending external email via SAPCONNECT *
TABLES: ekko.
PARAMETERS: p_email TYPE somlreci1-receiver.
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.
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: l_t_objhead LIKE solisti1 OCCURS 1 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(2) TYPE c VALUE '0D', "OK for non Unicode
*con_tab(2) TYPE c 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 con_tab.
CONCATENATE con_cret 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 con_tab.
CONCATENATE con_cret 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 = 'REPORT'.
w_doc_data-obj_descr = ld_mtitle . "mail description
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'.
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 1st attachment notification*
*t_packing_list-transf_bin = 'X'.*
*t_packing_list-head_start = 0.*
*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.*
***Create 2nd attachment notification*
*data: x type i.*
*DESCRIBE TABLE t_attachment LINES X.*
*append lines of it_attach to t_attachment.*
*data: start type i,*
*end type i,*
*cal type i.*
*start = X + 1.*
*describe table t_attachment lines end.*
*cal = end - start.*
*t_packing_list-transf_bin = 'X'.*
*t_packing_list-head_start = 0.*
*t_packing_list-head_num = 1.*
*t_packing_list-body_start = start.*
*t_packing_list-body_num = end.*
**DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.*
*t_packing_list-obj_descr = 'Eng Change'. "ld_attdescription.*
*t_packing_list-doc_type = ld_format.*
**t_packing_list-obj_name = 'Eng' .*
*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'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND 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
object_header = l_t_objhead
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.
*& 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
Similar Messages
-
When I send an email with attachments and open them on my ipad some of them open but others do not
When I send an email with attachments and open them on my ipad some of them open but others do not
What are the types that won't open?
Do you have an App that can open those types of files? -
Why can't I send an email with attachments?
I've been trying to send an email with a biology review on it so that my mom can print it out but it keeps telling me that I can't send the email. The exact message is "To send this message, delete the current attachments and attach them again." I've done that ad it's still not working and giving me the same message. What do I do??
jo1retired,
Being able to send and receive email on your smartphone is one of the more important pieces to having a phone. We can certainly help you get everything up and running on the phone for you. Have you ever been able to send email from your cell phone? Do you have any other email accounts on the LG phone? Please share some additional information so that we can assist.
CandiceH_VZW
Follow us on Twitter @VZWSupport -
Safari Quits When Trying to Send an Email With Attachments
I use gmail to send attachments. Now whenever i try to send an message that has an attachment, it quits unexpectedly. This is the only problem i have with Safari. I created another account to check if the problem is in the account itself but Safari didn't exist in the new account (it shows a question mark as an icon for Safari).
ThanxNaif MG wrote:
I created another account to check if the problem is in the account itself but Safari didn't exist in the new account (it shows a question mark as an icon for Safari).
If Safari is in its default location in the Applications folder, this shouldn't happen. I'm guessing you moved it from that location, either into another folder or a subfolder of the Applications folder. Move it back into the Applications folder and this part of the problem should be solved. -
Sending an email with attachments in Java using FileUpload UI Element
Hello Experts,
I'm using NWDS 7.01 SP6.
I have an application that has a FileUpload ui element. The elements resource property is bound to a context node of type Resource from the Local Dictionary from uielementsdefinitions.
The question I have is, how can I take the uploaded file from the context, and attach it to an email using the javax.mail.* api?
Do I need to store it somewhere first or can it be taken directly from the context attribute? If I need to store it, where do I store it?
Any help or suggestions are appreciated.
Thanks
MMHello Experts,
I'm using NWDS 7.01 SP6.
I have an application that has a FileUpload ui element. The elements resource property is bound to a context node of type Resource from the Local Dictionary from uielementsdefinitions.
The question I have is, how can I take the uploaded file from the context, and attach it to an email using the javax.mail.* api?
Do I need to store it somewhere first or can it be taken directly from the context attribute? If I need to store it, where do I store it?
Any help or suggestions are appreciated.
Thanks
MM -
On my imax, all of a sudden I am unable to send original emails with attachments of any size. I can attached the file but when I try to transmit, it will not go.
Also, if I am emailing back and forth, once there gets to be several threads, it will no longer transmit. Any suggestions. I am using gmail in the apple mail systemMike,
Are any of your other applications going wonky, or is it just Logic?
I'm afraid I've never heard of this particular problem before, but if it were happening to me the first thing I would do is delete my "com.apple.logic.express.plist" file in Library>Preferences, then repair permissions in Disc Utility, and finally restart my computer. Then I would launch Logic and see if the problem has been corrected. It's amazing how much these two steps can accomplish.
If that doesn't resolve the issue I would launch Logic and go to Preferences>Audio Units Manager to see if all my plug-ins are properly validated. -
Functionality to send email with attachments.(all types ot attachments)
Hi experts,
I have an requirement to modify the existing workflow to include the new part/functionality to send the email with attachments.
I mean, the existing workflow is sending only the notification as of now, the new requirement was i need to add the new functionalaity such a way the email functionality needs to be enabled so that the receiver who is receiving the notification will also get the email as well along with the attachments.
Note* Attachment could be of any types like pdf,tex,word etc...
Please suggest will it be possible to achieve this functionalites?
Any sample code will be a great help for me.
Thanks in advance,
Thiru.You can send attachments in email notification by defining message attributes of type document. Oracle Workflow supports document types called "PL/SQL" documents, "PL/SQL CLOB" documents, and "PL/SQL BLOB" documents.
You can go through the below document for defining documents.
http://www-apps.us.oracle.com/wf/doc/wfr1213/wfdg/html/T361836T362168.htm#2807860 -
Email not in sent box when I send email with attachments in Word.
Several times, I've noticed that when I send an email with attachments in Word = .doc format, I don't find the emails in my Sent Box…Why?
Then this sounds like a problem at the receiving end. More information is needed.
-
How to send Email with attachments
Hi im Trying to send a file as attachment using EMail Activity operator.
Can we do it using Email activity? If yes, then how can we do it? If no, then please tell me about any other method using which i can send a email with attachments.
Regards
VibhutiBetter late than never, a comprehensive demo on the topic:
REM
REM maildemo.sql - A PL/SQL package to demonstrate how to use the UTL_SMTP
REM package to send emails in ASCII and non-ASCII character sets, emails
REM with text or binary attachments.
REM
REM Note: this package relies on the UTL_ENCODE PL/SQL package in Oracle 9i.
CREATE OR REPLACE PACKAGE demo_mail IS
----------------------- Customizable Section -----------------------
-- Customize the SMTP host, port and your domain name below.
smtp_host VARCHAR2(256) := 'smtp-server.some-company.com';
smtp_port PLS_INTEGER := 25;
smtp_domain VARCHAR2(256) := 'some-company.com';
-- Customize the signature that will appear in the email's MIME header.
-- Useful for versioning.
MAILER_ID CONSTANT VARCHAR2(256) := 'Mailer by Oracle UTL_SMTP';
--------------------- End Customizable Section ---------------------
-- A unique string that demarcates boundaries of parts in a multi-part email
-- The string should not appear inside the body of any part of the email.
-- Customize this if needed or generate this randomly dynamically.
BOUNDARY CONSTANT VARCHAR2(256) := '-----7D81B75CCC90D2974F7A1CBD';
FIRST_BOUNDARY CONSTANT VARCHAR2(256) := '--' || BOUNDARY || utl_tcp.CRLF;
LAST_BOUNDARY CONSTANT VARCHAR2(256) := '--' || BOUNDARY || '--' ||
utl_tcp.CRLF;
-- A MIME type that denotes multi-part email (MIME) messages.
MULTIPART_MIME_TYPE CONSTANT VARCHAR2(256) := 'multipart/mixed; boundary="'||
BOUNDARY || '"';
MAX_BASE64_LINE_WIDTH CONSTANT PLS_INTEGER := 76 / 4 * 3;
-- A simple email API for sending email in plain text in a single call.
-- The format of an email address is one of these:
-- someone@some-domain
-- "Someone at some domain" <someone@some-domain>
-- Someone at some domain <someone@some-domain>
-- The recipients is a list of email addresses separated by
-- either a "," or a ";"
PROCEDURE mail(sender IN VARCHAR2,
recipients IN VARCHAR2,
subject IN VARCHAR2,
message IN VARCHAR2);
-- Extended email API to send email in HTML or plain text with no size limit.
-- First, begin the email by begin_mail(). Then, call write_text() repeatedly
-- to send email in ASCII piece-by-piece. Or, call write_mb_text() to send
-- email in non-ASCII or multi-byte character set. End the email with
-- end_mail().
FUNCTION begin_mail(sender IN VARCHAR2,
recipients IN VARCHAR2,
subject IN VARCHAR2,
mime_type IN VARCHAR2 DEFAULT 'text/plain',
priority IN PLS_INTEGER DEFAULT NULL)
RETURN utl_smtp.connection;
-- Write email body in ASCII
PROCEDURE write_text(conn IN OUT NOCOPY utl_smtp.connection,
message IN VARCHAR2);
-- Write email body in non-ASCII (including multi-byte). The email body
-- will be sent in the database character set.
PROCEDURE write_mb_text(conn IN OUT NOCOPY utl_smtp.connection,
message IN VARCHAR2);
-- Write email body in binary
PROCEDURE write_raw(conn IN OUT NOCOPY utl_smtp.connection,
message IN RAW);
-- APIs to send email with attachments. Attachments are sent by sending
-- emails in "multipart/mixed" MIME format. Specify that MIME format when
-- beginning an email with begin_mail().
-- Send a single text attachment.
PROCEDURE attach_text(conn IN OUT NOCOPY utl_smtp.connection,
data IN VARCHAR2,
mime_type IN VARCHAR2 DEFAULT 'text/plain',
inline IN BOOLEAN DEFAULT TRUE,
filename IN VARCHAR2 DEFAULT NULL,
last IN BOOLEAN DEFAULT FALSE);
-- Send a binary attachment. The attachment will be encoded in Base-64
-- encoding format.
PROCEDURE attach_base64(conn IN OUT NOCOPY utl_smtp.connection,
data IN RAW,
mime_type IN VARCHAR2 DEFAULT 'application/octet',
inline IN BOOLEAN DEFAULT TRUE,
filename IN VARCHAR2 DEFAULT NULL,
last IN BOOLEAN DEFAULT FALSE);
-- Send an attachment with no size limit. First, begin the attachment
-- with begin_attachment(). Then, call write_text repeatedly to send
-- the attachment piece-by-piece. If the attachment is text-based but
-- in non-ASCII or multi-byte character set, use write_mb_text() instead.
-- To send binary attachment, the binary content should first be
-- encoded in Base-64 encoding format using the demo package for 8i,
-- or the native one in 9i. End the attachment with end_attachment.
PROCEDURE begin_attachment(conn IN OUT NOCOPY utl_smtp.connection,
mime_type IN VARCHAR2 DEFAULT 'text/plain',
inline IN BOOLEAN DEFAULT TRUE,
filename IN VARCHAR2 DEFAULT NULL,
transfer_enc IN VARCHAR2 DEFAULT NULL);
-- End the attachment.
PROCEDURE end_attachment(conn IN OUT NOCOPY utl_smtp.connection,
last IN BOOLEAN DEFAULT FALSE);
-- End the email.
PROCEDURE end_mail(conn IN OUT NOCOPY utl_smtp.connection);
-- Extended email API to send multiple emails in a session for better
-- performance. First, begin an email session with begin_session.
-- Then, begin each email with a session by calling begin_mail_in_session
-- instead of begin_mail. End the email with end_mail_in_session instead
-- of end_mail. End the email session by end_session.
FUNCTION begin_session RETURN utl_smtp.connection;
-- Begin an email in a session.
PROCEDURE begin_mail_in_session(conn IN OUT NOCOPY utl_smtp.connection,
sender IN VARCHAR2,
recipients IN VARCHAR2,
subject IN VARCHAR2,
mime_type IN VARCHAR2 DEFAULT 'text/plain',
priority IN PLS_INTEGER DEFAULT NULL);
-- End an email in a session.
PROCEDURE end_mail_in_session(conn IN OUT NOCOPY utl_smtp.connection);
-- End an email session.
PROCEDURE end_session(conn IN OUT NOCOPY utl_smtp.connection);
END;
CREATE OR REPLACE PACKAGE BODY demo_mail IS
-- Return the next email address in the list of email addresses, separated
-- by either a "," or a ";". The format of mailbox may be in one of these:
-- someone@some-domain
-- "Someone at some domain" <someone@some-domain>
-- Someone at some domain <someone@some-domain>
FUNCTION get_address(addr_list IN OUT VARCHAR2) RETURN VARCHAR2 IS
addr VARCHAR2(256);
i pls_integer;
FUNCTION lookup_unquoted_char(str IN VARCHAR2,
chrs IN VARCHAR2) RETURN pls_integer AS
c VARCHAR2(5);
i pls_integer;
len pls_integer;
inside_quote BOOLEAN;
BEGIN
inside_quote := false;
i := 1;
len := length(str);
WHILE (i <= len) LOOP
c := substr(str, i, 1);
IF (inside_quote) THEN
IF (c = '"') THEN
inside_quote := false;
ELSIF (c = '\') THEN
i := i + 1; -- Skip the quote character
END IF;
GOTO next_char;
END IF;
IF (c = '"') THEN
inside_quote := true;
GOTO next_char;
END IF;
IF (instr(chrs, c) >= 1) THEN
RETURN i;
END IF;
<<next_char>>
i := i + 1;
END LOOP;
RETURN 0;
END;
BEGIN
addr_list := ltrim(addr_list);
i := lookup_unquoted_char(addr_list, ',;');
IF (i >= 1) THEN
addr := substr(addr_list, 1, i - 1);
addr_list := substr(addr_list, i + 1);
ELSE
addr := addr_list;
addr_list := '';
END IF;
i := lookup_unquoted_char(addr, '<');
IF (i >= 1) THEN
addr := substr(addr, i + 1);
i := instr(addr, '>');
IF (i >= 1) THEN
addr := substr(addr, 1, i - 1);
END IF;
END IF;
RETURN addr;
END;
-- Write a MIME header
PROCEDURE write_mime_header(conn IN OUT NOCOPY utl_smtp.connection,
name IN VARCHAR2,
value IN VARCHAR2) IS
BEGIN
utl_smtp.write_data(conn, name || ': ' || value || utl_tcp.CRLF);
END;
-- Mark a message-part boundary. Set <last> to TRUE for the last boundary.
PROCEDURE write_boundary(conn IN OUT NOCOPY utl_smtp.connection,
last IN BOOLEAN DEFAULT FALSE) AS
BEGIN
IF (last) THEN
utl_smtp.write_data(conn, LAST_BOUNDARY);
ELSE
utl_smtp.write_data(conn, FIRST_BOUNDARY);
END IF;
END;
PROCEDURE mail(sender IN VARCHAR2,
recipients IN VARCHAR2,
subject IN VARCHAR2,
message IN VARCHAR2) IS
conn utl_smtp.connection;
BEGIN
conn := begin_mail(sender, recipients, subject);
write_text(conn, message);
end_mail(conn);
END;
FUNCTION begin_mail(sender IN VARCHAR2,
recipients IN VARCHAR2,
subject IN VARCHAR2,
mime_type IN VARCHAR2 DEFAULT 'text/plain',
priority IN PLS_INTEGER DEFAULT NULL)
RETURN utl_smtp.connection IS
conn utl_smtp.connection;
BEGIN
conn := begin_session;
begin_mail_in_session(conn, sender, recipients, subject, mime_type,
priority);
RETURN conn;
END;
PROCEDURE write_text(conn IN OUT NOCOPY utl_smtp.connection,
message IN VARCHAR2) IS
BEGIN
utl_smtp.write_data(conn, message);
END;
PROCEDURE write_mb_text(conn IN OUT NOCOPY utl_smtp.connection,
message IN VARCHAR2) IS
BEGIN
utl_smtp.write_raw_data(conn, utl_raw.cast_to_raw(message));
END;
PROCEDURE write_raw(conn IN OUT NOCOPY utl_smtp.connection,
message IN RAW) IS
BEGIN
utl_smtp.write_raw_data(conn, message);
END;
PROCEDURE attach_text(conn IN OUT NOCOPY utl_smtp.connection,
data IN VARCHAR2,
mime_type IN VARCHAR2 DEFAULT 'text/plain',
inline IN BOOLEAN DEFAULT TRUE,
filename IN VARCHAR2 DEFAULT NULL,
last IN BOOLEAN DEFAULT FALSE) IS
BEGIN
begin_attachment(conn, mime_type, inline, filename);
write_text(conn, data);
end_attachment(conn, last);
END;
PROCEDURE attach_base64(conn IN OUT NOCOPY utl_smtp.connection,
data IN RAW,
mime_type IN VARCHAR2 DEFAULT 'application/octet',
inline IN BOOLEAN DEFAULT TRUE,
filename IN VARCHAR2 DEFAULT NULL,
last IN BOOLEAN DEFAULT FALSE) IS
i PLS_INTEGER;
len PLS_INTEGER;
BEGIN
begin_attachment(conn, mime_type, inline, filename, 'base64');
-- Split the Base64-encoded attachment into multiple lines
i := 1;
len := utl_raw.length(data);
WHILE (i < len) LOOP
IF (i + MAX_BASE64_LINE_WIDTH < len) THEN
utl_smtp.write_raw_data(conn,
utl_encode.base64_encode(utl_raw.substr(data, i,
MAX_BASE64_LINE_WIDTH)));
ELSE
utl_smtp.write_raw_data(conn,
utl_encode.base64_encode(utl_raw.substr(data, i)));
END IF;
utl_smtp.write_data(conn, utl_tcp.CRLF);
i := i + MAX_BASE64_LINE_WIDTH;
END LOOP;
end_attachment(conn, last);
END;
PROCEDURE begin_attachment(conn IN OUT NOCOPY utl_smtp.connection,
mime_type IN VARCHAR2 DEFAULT 'text/plain',
inline IN BOOLEAN DEFAULT TRUE,
filename IN VARCHAR2 DEFAULT NULL,
transfer_enc IN VARCHAR2 DEFAULT NULL) IS
BEGIN
write_boundary(conn);
write_mime_header(conn, 'Content-Type', mime_type);
IF (filename IS NOT NULL) THEN
IF (inline) THEN
write_mime_header(conn, 'Content-Disposition',
'inline; filename="'||filename||'"');
ELSE
write_mime_header(conn, 'Content-Disposition',
'attachment; filename="'||filename||'"');
END IF;
END IF;
IF (transfer_enc IS NOT NULL) THEN
write_mime_header(conn, 'Content-Transfer-Encoding', transfer_enc);
END IF;
utl_smtp.write_data(conn, utl_tcp.CRLF);
END;
PROCEDURE end_attachment(conn IN OUT NOCOPY utl_smtp.connection,
last IN BOOLEAN DEFAULT FALSE) IS
BEGIN
utl_smtp.write_data(conn, utl_tcp.CRLF);
IF (last) THEN
write_boundary(conn, last);
END IF;
END;
PROCEDURE end_mail(conn IN OUT NOCOPY utl_smtp.connection) IS
BEGIN
end_mail_in_session(conn);
end_session(conn);
END;
FUNCTION begin_session RETURN utl_smtp.connection IS
conn utl_smtp.connection;
BEGIN
-- open SMTP connection
conn := utl_smtp.open_connection(smtp_host, smtp_port);
utl_smtp.helo(conn, smtp_domain);
RETURN conn;
END;
PROCEDURE begin_mail_in_session(conn IN OUT NOCOPY utl_smtp.connection,
sender IN VARCHAR2,
recipients IN VARCHAR2,
subject IN VARCHAR2,
mime_type IN VARCHAR2 DEFAULT 'text/plain',
priority IN PLS_INTEGER DEFAULT NULL) IS
my_recipients VARCHAR2(32767) := recipients;
my_sender VARCHAR2(32767) := sender;
BEGIN
-- Specify sender's address (our server allows bogus address
-- as long as it is a full email address ([email protected]).
utl_smtp.mail(conn, get_address(my_sender));
-- Specify recipient(s) of the email.
WHILE (my_recipients IS NOT NULL) LOOP
utl_smtp.rcpt(conn, get_address(my_recipients));
END LOOP;
-- Start body of email
utl_smtp.open_data(conn);
-- Set "From" MIME header
write_mime_header(conn, 'From', sender);
-- Set "To" MIME header
write_mime_header(conn, 'To', recipients);
-- Set "Subject" MIME header
write_mime_header(conn, 'Subject', subject);
-- Set "Content-Type" MIME header
write_mime_header(conn, 'Content-Type', mime_type);
-- Set "X-Mailer" MIME header
write_mime_header(conn, 'X-Mailer', MAILER_ID);
-- Set priority:
-- High Normal Low
-- 1 2 3 4 5
IF (priority IS NOT NULL) THEN
write_mime_header(conn, 'X-Priority', priority);
END IF;
-- Send an empty line to denotes end of MIME headers and
-- beginning of message body.
utl_smtp.write_data(conn, utl_tcp.CRLF);
IF (mime_type LIKE 'multipart/mixed%') THEN
write_text(conn, 'This is a multi-part message in MIME format.' ||
utl_tcp.crlf);
END IF;
END;
PROCEDURE end_mail_in_session(conn IN OUT NOCOPY utl_smtp.connection) IS
BEGIN
utl_smtp.close_data(conn);
END;
PROCEDURE end_session(conn IN OUT NOCOPY utl_smtp.connection) IS
BEGIN
utl_smtp.quit(conn);
END;
END;
/ -
How do I send an email with an attachment larger than 20mb
I am using exchange 2013 and I have users that when they send any emails with attachments over 20mb, it fails.
How do I change the setting to allow up to 30mb attachments in size? I've googled this, but to no avail.
In ECP, I looked under mailflow and then rules, but I don't have any rules there. I tried creating one, but I can't because I don't have the enterprise CALs I guess is what it's telling me.
Any help would be appreciated.
DanHello Everyone, I've already tried everything that was suggested, I changed everything to 50 or 60 MB.
The user settings is unlimited. For testing, I changed my own account to 100mb.
Still the same error message.
[PS] C:\Windows\system32>get-transportconfig
AddressBookPolicyRoutingEnabled
: False
AnonymousSenderToRecipientRatePerHour : 1800
ClearCategories
: True
ConvertDisclaimerWrapperToEml
: False
DSNConversionMode
: UseExchangeDSNs
EnableJournalArchive
: False
ExternalDelayDsnEnabled
: True
ExternalDsnDefaultLanguage
ExternalDsnLanguageDetectionEnabled : True
ExternalDsnMaxMessageAttachSize
: 50 MB (52,428,800 bytes)
ExternalDsnReportingAuthority
ExternalDsnSendHtml
: True
ExternalPostmasterAddress
GenerateCopyOfDSNFor
: {5.4.8, 5.4.6, 5.4.4, 5.2.4, 5.2.0, 5.1.4}
HygieneSuite
: Standard
InternalDelayDsnEnabled :
True
InternalDsnDefaultLanguage
InternalDsnLanguageDetectionEnabled : True
InternalDsnMaxMessageAttachSize
: 50 MB (52,428,800 bytes)
InternalDsnReportingAuthority
InternalDsnSendHtml
: True
InternalSMTPServers
JournalingReportNdrTo
: <>
LegacyJournalingMigrationEnabled
: False
LegacyArchiveJournalingEnabled
: False
LegacyArchiveLiveJournalingEnabled : False
RedirectUnprovisionedUserMessagesForLegacyArchiveJournaling : False
RedirectDLMessagesForLegacyArchiveJournaling : False
MaxDumpsterSizePerDatabase
: 33 MB (34,603,008 bytes)
MaxDumpsterTime
: 7.00:00:00
MaxReceiveSize
: 60 MB (62,914,560 bytes)
MaxRecipientEnvelopeLimit
: 5000
MaxRetriesForLocalSiteShadow
: 2
MaxRetriesForRemoteSiteShadow :
4
MaxSendSize
: 60 MB (62,914,560 bytes)
MigrationEnabled
: False
OpenDomainRoutingEnabled
: False
RejectMessageOnShadowFailure
: False
Rfc2231EncodingEnabled
: False
SafetyNetHoldTime
: 2.00:00:00
ShadowHeartbeatFrequency
: 00:02:00
ShadowMessageAutoDiscardInterval
: 2.00:00:00
ShadowMessagePreferenceSetting
: PreferRemote
ShadowRedundancyEnabled
: True
ShadowResubmitTimeSpan :
03:00:00
SupervisionTags
: {Reject, Allow}
TLSReceiveDomainSecureList
TLSSendDomainSecureList
VerifySecureSubmitEnabled
: False
VoicemailJournalingEnabled
: True
HeaderPromotionModeSetting
: NoCreate
Xexch50Enabled
: True
[PS] C:\Windows\system32>
[PS] C:\Windows\system32>get-receiveconnector | fl maxmessagesize
MaxMessageSize : 50 MB (52,428,800 bytes)
MaxMessageSize : 50 MB (52,428,800 bytes)
MaxMessageSize : 50 MB (52,428,800 bytes)
MaxMessageSize : 50 MB (52,428,800 bytes)
MaxMessageSize : 50 MB (52,428,800 bytes)
MaxMessageSize : 50 MB (52,428,800 bytes)
MaxMessageSize : 50 MB (52,428,800 bytes)
MaxMessageSize : 50 MB (52,428,800 bytes)
MaxMessageSize : 50 MB (52,428,800 bytes)
MaxMessageSize : 50 MB (52,428,800 bytes)
[PS] C:\Windows\system32>
[PS] C:\Windows\system32>get-sendconnector | fl maxmessagesize
MaxMessageSize : 60 MB (62,914,560 bytes)
MaxMessageSize : 65 MB (68,157,440 bytes)
[PS] C:\Windows\system32>
[PS] C:\Windows\system32>get-transportconfig | fl externaldsnmaxmessageattachsize
ExternalDsnMaxMessageAttachSize : 50 MB (52,428,800 bytes)
[PS] C:\Windows\system32>
[PS] C:\Windows\system32>get-transportconfig | fl internaldsnmaxmessageattachsize
InternalDsnMaxMessageAttachSize : 50 MB (52,428,800 bytes)
[PS] C:\Windows\system32>
[PS] C:\Windows\system32>get-transportconfig | fl maxsendsize
MaxSendSize : 60 MB (62,914,560 bytes)
[PS] C:\Windows\system32>
Is there any other setting you want to see? Is there another configuration change I missed?
Dan -
SOA Suite 11g - Email with attachments (Attachment from SOAP attachment)
Hello,
Can any one please help as to how I can do the following in Oracle SOA 11g:
Using a BPEL process how can I send an Email with attachments where the attachment itself is coming from a SOAP attachment.
The back ground is that we have portal sites from where the users can upload a document and then from their a SOA service is invoked and the attachment would be passed as (SOAP attachments) and then emails have to be send to users containing this uploaded document as the attachment.
Thanks.
feel free to email me [email protected]Yes, I need all supported standards and their version of SOA Suite 11g because my customer wants to upgrade from 10g to 11g, especially all supported standards and version number of OBPM 11g and OBPM 10g.
A people has pasted all support standards and version number of OBPM 10g. I get a standard list of OSB.
OBPM 11g supports:
BPEL
xml 1.0
Servlet 2.3\JSP1.2 (J2EE 1.2),
Servlet 2.4\JSP2.0(J2EE 1.4),
Servlet 2.5\JSP2.1(Java EE 1.5)
UDDI
SOAP
WSDL
WS-BPEL for People
XML Schema
XPDL
SOAP
XQuery
XLIFF
XSL map
XSLT
UML
Ant
EJB 2.1, JPA/EJB 3.0
JAAS
Spring
JAXB 1.0, JAXB 2.0
XHTML
HTML
JSP
JSF
JSR-168
XSQL
WS-Policy
But I cannot find the document about version number of the above standards -
System cannot find the path specified when sending emails with attachments
I've had an on going issue for some time on one of my clients whereby users will intermittently get this error "The System cannot find the path specified." when they try to send an email with an attachment.
The issue seems to arise generally (though reportedly not only when) when someone creates an email and attaches a file but leaves it for some time before finishing and sending.
The staff run in a Windows 2008 R2 full Terminal Server desktop environment on Office 2010 (32-bit 14.0.7140.5002) and several staff have reported the same issue.
I have been able to replicate the issue in their environment by creating an email and leaving it for some time.
After a fair bit of scouting around I found that if I monitor the temp directory that the attachments get placed into (content.outlook under Temporary Internet Files on user profile) and found that the directory with the attachments would disappear after
a period of time which would then cause the error where obviously Outlook could not find the file that had now gone.
I don't know of any Outlook settings that would cause this and the issue isn't related to temporary Internet files filling up as I've recreated the error on a user account where there is nothing else stored in the Temporary Internet Files.
To work around the issue I have changed the reg file that tells Outlook where to place these files (HKCU/Sofware/Microsoft/office/14.0/outlook/security - OutlookSecureTempFolder) to a location in the users home drive.
This appears to resolve the problem however I am noticing 1 issue with this. Unlike the temp folder which gets purged after a file is no longer required, the location I've changed it to does not clear out old files.
While it shouldn't be too difficult to add a script that can clear the files at log off it would be good to see if anyone may know what the cause of the problem in the first place is. I would rather it work as it should than have to bodge around changing
the folder and scripting file deletes.
Does anyone know of what maybe causing the attachments and content.outlook folder to disappear?
thanksDo you have any redirected folder in your environment? Is the original Temporary Internet Files folder stored on a server?
Basically, the attachments remain in the Outlook Secure Temporary File folder if we exit Microsoft Outlook while email attachments are open. See:
http://support.microsoft.com/kb/817878
Flynn -
Sending email with attachments not working on Lumi...
It is not possible to attach a file to an email, either via WiFi or my 4G connection. I have two different Office365 email accounts (work and private) that work perfectly when sending/receiving emails with/without attachments. However when I try and share a photo (from any folder in Photos) I can select a photo, choose Share-->Email account, but when it brings up the email message screen there is nothing attached. The same thing happens if I create an ordinary email and try to attach any file, it won't attach and the email sends OK without the attachment.
It is not an issue with the email accounts as I can send/receive attachments OK from my laptop and iPad. It is only when I try and send from my 1520.
This has got me baffled!try to delete the account and re-add the account.
then, try to take a picture and immediately go to that image by tapping it on the screen and sharing as you stated.
if that doesn't work, then I wonder if the device is corrupted and the images are not "really there"
can you see the images on your skydrive account?
have you tried to do a soft reset?
Soft Reset-
Hold Vol- & Pwr until the device shuts down
When the device vibrates and starts to reboot, release ONLY Pwr button, still holding the Vol-
When you see the (!) on your screen, then release the Vol- button and wait until the device boots.
Your device is now soft reset -
Sometimes Mail is slow emptying trash folder or sending emails with attachments
This happens occasionally- but enough to be an annoyance!
I am about to send an email using Mail to an address, and I wait very patiently while the Mail program makes a copy, communicates with server, then finally sends the email. Sometimes, to send an email with a simple attachment, this can take as long as three to four minutes!
Another related problem is Emptying the Trash folder.
Sometimes it takes an inordinate amount of time to do this, and other times such "deletion" takes mere few seconds.
I wonder what it is I'm doing wrong.''jbugler [[#question-1058767|said]]''
<blockquote>
Hi
The context of this question is:
* I've had an Apple iMac for just over 3 years;
* and I've been using their 'Mail' application to send/receive emails;
* but not infrequently, when I send an email with one or more attachments all of the email doesn't get to the recipient;
* and after working with Apple and getting nowhere;
* I'm now using Thunderbird instead of Mail.
I like Thunderbird, but I've noticed that if I send an email with an attachment (an example is an email I've just sent with a 2.6MB attachment), it takes a while to both (a) first send and then (b) copy the email to my 'send' folder.
Are there any 'settings' changes I can make to speed things up, or do I just need a bigger machine? (I've noticed that over the 3+ years I've had the iMac, it's got progressively slower and slower.)
Regards
John Bugler
</blockquote>
Many thanks -
Sending email with attachments
Hi,
I want to sent an email with more than one attachments (for example word and pdf documents). I have attached and sent the mail with pdf document but i couldn't attach the other file. Can anybody tell me the way to do this?
thanksCheck the Following Link sending an email with multiple attachments
Kanagaraja L -
Outlook 2010 wont send emails with attachments
Hello
I was starting to write the question when we found out what the problem was. So I thought I would share our resolution in here, in case someone fall in the same issue.
One of my user with Outlook 2010 cannot send emails with attachments of some size. +-50 kb files works fine.
But when we try a file of 1mb, the mail goes in the Outbox, Exchange status swith from Connected to Disconnected and the email stay there.
The user is in a remote location, connected through VPN with the network where the Exchange 2013 server is
Here is what I did:
1. Re-create Outlook profile: wont work
2. Re-create Windows profile: wont work
3. Check ip settings: fine
4. Try in OWA: wont work
5. Look at Exchange settings for outgoing email size: 10mb
6. Load my user's Outlook profile on another LAN: works fine
That last point made me thought about a potential problem on the remote user's lan. So I did
7. Check VPN config between the remote site and IT site: fine
After googling the problem, I found that website (http://community.spiceworks.com/topic/396793-outlook-2010-client-suddenly-showing-disconnected-from-2013-exchange-server) that suggest to change the DNS setting on the client. However, the DHCP of my remote
user was the router itself, which is giving a DC as primary DNS, and ISP DNS as secondary. I changed the secondary DNS for another DC in our organization, and guess what? Voila! Problem is gone!
Thinking about it that make not much sense, as the primary DNS is always up the secondary shouldn't be queried. But that's what resolved our problem.
Hope it helps someone!
MartinHi Martin,
Thanks for your sharing:)
If you have any question about Microsoft Office, welcome to contact us and feel free to post your issue on Office forum.
Regards,
Winnie Liang
TechNet Community Support
Maybe you are looking for
-
Someone has stolen my ipod. I do not have it with me, but is there another way to find the cerial number or another piece of information i could turn into the police? is there anyway of getting it back, Becuase i hav a good idea of who stole it, and
-
RMI server calling a method on a client object ?
Hi All, I am writing a client - server application and my intention is to use RMI for comunication. When the client has to retrive datas from the server it's easy, but let's suppose that the server has to inform the client about some updates about th
-
Book shows up on computer but not iPod
Downloaded book "Frankenweenie: An Electrifying Book" from iTunes on my Laptop. It shows up in my Library, but when I go t ocopy it to my iPod Touch (32 GB 4g iOS 6 ), I get the little plus on the cursur, but it does not transfer to the iPod. Any ide
-
Oracle to WebLogic error - OBJ_ADAPTER: MINOR CODE: 1398079492
I am trying to perform an RMI call from a Java Stored Procedure within Oracle 9i to Weblogic 8.1. I am using the following code: env.put("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory"); env.put("java.naming.provider.url", "iiop:
-
Use condition for assigning query to data provider with Javascript
Hi gurus, I want to assign a query dynamically to a data provider when the user activated a Tab Panel in a Web Template (BI7). I can do that easily with the standard function SET_DATA_PROVIDER_PARAMETERS but this action is do each time of the activat