Mail send command inoperable
Mail send command after composing message stopped working. Application opens and downloads messages w/o difficulty, sends automated messages from iCal but won't send when the "send" button is clicked. I am running MailTags but that is not something new. Works fine w/ same version on my laptop and MacMini.....
Very strange. Any ideas?
This problem in Mail is usually caused by some Launch Services cache or preferences corruption. The following article describes how to manually reset Launch Services -- the notes at the bottom of the article also provide information about the side effects of deleting each of the files involved:
Resetting Launch Services
If you prefer using a cache cleaning utility instead of following the manual procedure described in the previous article, this other article provides links to some utilities that can be used for troubleshooting and cache cleaning:
Resolving Disk, Permission, and Cache Corruption
It seems that the most appropriate utility for solving this particular problem is Tiger Cache Cleaner, but you may also want to consider other utilities, such as OnyX, or Cache Out X, which are free. Whatever utility you choose, be sure to read this first:
Side effects of System cache cleaning
As an example, this is how you should proceed with OnyX:
1. Quit all applications.
2. Launch OnyX and enter your administrator password.
3. Click Maintenance. In the Reset section, check LaunchServices database.
4. You may uncheck any other pre-checked options if you wish.
5. Click the Execute button.
6. Restart the computer.
7. If the problem persists, try again checking the Links between documents and applications option in step 3 instead.
Similar Messages
-
I am using iplanet messaging 5.2. I want to send mail using command line. Anyone knows exact command line syntax.
Thanks
-Vasu#telnet 0 25
mail from: user1 #email source
rcpt to: [email protected] #email destination
data #begin email content
Subject: Hi, This is a test mail #optional subject
Hi, Please don't pay attention to this email, just a test
. #end email content
quit #Quit SMTP
# -
Sending Commands to Comp from Phone through Mail Problem
okay so I want to be able to send commands to my computer from my phone. the best way I found to do this is via mail. so I would say send a email saying "weather Madison Wi" then it would recieve the email and send me the result. Problem is when i run the code it only pauses itunes then does nothing else. idk why. heres my code any help would be appreciated:
on performmailaction(info)
-- see if iTunes is playing
set itunes_playing to false
tell application "System Events"
if (get name of every process) does not contain "iTunes" then
set itunes_playing to false
else
tell application "iTunes"
if player state is playing then set itunes_playing to true
end tell
end if
end tell
-- pause iTunes if needed
if itunes_playing is true then tell application "iTunes" to pause
tell application "Mail"
set the_messages to |SelectedMessages| of info
repeat with a_message in the_messages
set the_sender to extract name from sender of a_message
set the_subject to extract name from subject of a_message
set the_content to extract name from content of a_message
if (junk mail status of a_message) is not true then
say "Mail from " & the_sender
if the_sender is "My Name here" then
if the_content contains "weather" then
get the second word of the_content
set s to the result
get the third word of the_content
set c to the result
set temp to get_temp(s, c)
set theNewMessage to make new outgoing message with properties {subject:"Weather", content:"Current temp is : " & temp & " in " & c & "," & s, visible:true}
tell theNewMessage
make new to recipient at end of to recipients with properties {address:"my sms number"}
send
end tell
end if
else
set theNewMessage to make new outgoing message with properties {subject:"New Mail", content:"New Mail From: " & the_sender, visible:true}
tell theNewMessage
make new to recipient at end of to recipients with properties {address:"[email protected]"}
send
end tell
end if
end if
end repeat
end tell
-- resume iTunes if it was playing before
if itunes_playing is true then tell application "iTunes" to play
end performmailaction
on get_temp(stat, cit)
tell application "Safari"
activate
set state to stat
set town to cit
set URL of document 1 to "http://www.findlocalweather.com/forecast/" & state & "/" & town & ".html"
set page to text of document 1 as string
set pos to offset of "Temp: " in page
set final_pos to the offset of "°F" in page
set pos to pos + 8
set temp to characters pos thru (final_pos - 1) of page as string
quit
return temp
end tell
end get_tempI'm not sure why you think you need to pause iTunes as part of the script, but I'll leave that for now.
The problem may be that Mail.app cannot send a new message while it's processing a rule via AppleScript. There are numerous discussions about this, both here and elsewhere, so it may well be that there's nothing wrong with your script, it's just how it is. Take a look at this thread for some suggestions. -
Can't send command to SMTP host
Hi,
I am using Jdev11.1.1.2.0 and web logic servere10.3.I am using mail scheduling in weblogic.Actually in window server 2003 I am getting exception is
get message method--->Can't send command to SMTP host
javax.mail.MessagingException: Can't send command to SMTP host;
nested exception is:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
But same application windows7 Its working.
So can u give me the idea ? or any configuration webloigc in windows server 2003 ?
Plz help me.
Thanks
AnupI put environment variable (path) weblogic.jar but still same issue
get message method--->Can't send command to SMTP host
javax.mail.MessagingException: Can't send command to SMTP host;
nested exception is:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1564)
Plz give me the solution..
Thanks
Anup -
Xi mail sender adapter for outlook express configuration
hi,
can somone please tell me how to configure xi mail sender adapter for reading from inbox of outlook express?
i keep getting errors in communication channel monitor:
"exception caught during processing mail message; java.io.IOException: unexpected user response; read -ERR Command is not valid in this state."
Thanks
TomerHi,
use below link,finish the configuration of sender mail adapter,many documents available on the same in sdn,search your self
http://www.riyaz.net/blog/xipi-configuring-the-sender-mail-adapter/
Cheers,
Raj -
Mail Sender Adapter with IMAPS
Hi,
I had a Mail Sender Adapter running fine with imap. Our Email Server has changed now to secure protocol. Therefore I need to use the Mail Sender Adapter with IMAPS. If I use imaps://<mailserver>:993 in the channel configuration the Mail Adapter aborts with error "not initialized; mail agent null" and in the default trace it says "failed to initialize the channel: java.io.IOException: illegal protocol for XMBIMAPInitiator: imaps#". If I configure the Mail Adapter with <b>imap</b>://<mailserver>:993 the Mail Adapter starts and says "running", but it does not poll the postbox. In the security.log file there is a warning about untrusted certificates "com.sap.security.core.server.https.SecureConnectionFactory#Plain###Attempting to create outgoing ssl connection without trusted certificates#". I did already import the (CA) Certifcate of the mailserver with key storage service of J2EE Engine in the Trusted area and I configured the J2EE Engine for using SSL (the https access to the J2EE Engine works fine).
What is still missing in XI 3.0 (SP12)? I can access the postbox securely with e.g. Thunderbird using port 993.
Has anyone an idea or had already this issue?
Thanks for any help in advance.
PeterHi Sebastian ,
The Mail sender --IMAPS , did it solve your issue because i fcae the same kind of Error in Communication Channel :
exception caught during processing mail message; java.io.IOException: unable to create a socket
Mail sender CC:imaps://NZxxx.dknz.nzcorp.net:993/NZDKINVOICES
-Login Credentials is correct.
-Defualt XI Paramters are correct
-Mail Server is the right one
-Tried in command prompt , N:/telnet NZxxx.dznz.corp.net 143 , but i get response : Could not open connection to the host, on port 143 .Connection Failed
Could you kindly assist
Thanks,
Vara -
Exchange server 2013 mail send and received problem
Hi Support,
I have Install Exchange server 2013 and create mail box and local send received locally but days back i have not able to mail send and received. what setting are required for user mail send and received locally. and how to create mx and txt record for my
domain.Hi,
According to your description, I know that the Exchange server can send/receive internally at beginning, however doesn’t work now. Please correct me if there is anything misunderstand.
Great checklist from S.Nithyanandham. Additionally, how about sending/receiving via OWA? And any error messages when can’t send and receive?
Please make sure the Message Tracking has been enabled and run following command to output track log and check detail information:
Get-MessageTrackingLog |FL > "c:\Track Search.txt"
For more information about Message Tracking logs, please refer to below article:
http://technet.microsoft.com/en-us/library/bb124926
If you want to communicate externally, you need to contact ISP to register DNS MX record.
Best Regards,
Allen Wang -
hi experts
I want to send 2 attachments(.XLS) to email ,through the function module 'SO_DOCUMENT_SEND_API1' can any 1 guide me through step by step procedure.
regards
PRASUNhi check this example..
REPORT ZMAIL.
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: 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.
data: ld_store(50) type c. "Leading zeros
CONSTANTS: con_cret(5) TYPE c VALUE '0D', "OK for non Unicode
con_tab(5) 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.
*Modification to retain leading zeros
inserts code for excell REPLACE command into ld_store
=REPLACE("00100",1,5,"00100")
concatenate '=REPLACE("' wa_charekpo-ebelp '",1,5,"'
wa_charekpo-ebelp '")' into ld_store .
concatenate ld_store into .xls file instead of actual value(ebelp)
CONCATENATE wa_charekpo-ebeln ld_store 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 = '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'.
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'.
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
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
regards,
venkat -
Help. Mac mail sends myemails prematurely while I'm still composing..sometimes it sends 4-5 email versions in various states of completion. I've got clients asking what happened, because they only get a partial email..its becoming a serious problem. Help!
Launch the Console application in any of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ If you’re running OS X 10.7 or later, open LaunchPad. Click Utilities, then Console in the page that opens.
Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left.
Click the Clear Display icon in the toolbar. Try the action again. Post any messages that appear in the Console window – the text, please, not a screenshot.
Important: Some private information, such as your name, may appear in the log. Edit it out by search-and-replace in a text editor before posting. -
[Q] what is different of mail sending between HPUX and Solaris ??
All,
Would somebody let me know what different of mail sending between HPUX and Solaris is ?
I have several unix servers and some are HPUX 11.11 and some are Solaris v8.
To use "mailx" command in maintenance scripts, I set a relay server in sendmail.cf of /etc/mail.
What I'm curious is
,in HPUX, "mailx" is working without sendmail daemon. but in Solaris, "mailx" is not working without sendmail daemon.
I'm not good at those sendmail site. my knowldge of UNIX is very general, not specific and expertized. so need your help.
Why it works without sendmail daemon on HPUX, and why not on SUN which is not working sendmail daemon ??Hi,
do you have a mailhost entry in /etc/hosts pointing to your relay hsot?
Fritz -
Safari Services:Mail:Send Selection broken in Tiger
Since upgrading to Tiger, I can no longer email selected text in Safari using the Services:Mail:Send Selection command. Nothing happens.
Not that it should matter, but I'm using the Server version of Tiger.Yep, all updates are installed.
It works on my two Tiger (client) machines, but not on my server machine. -
ORA-29279: SMTP permanent error: 503 Issue MAIL FROM: command before RCPT T
Hi all, i have a procedure called proc_send_mail, the procedure obviously, send a mail using utl_smpt. I use that procedure in many clients and just in one of them, i got this error (ORA-29279: SMTP permanent error: 503 Issue MAIL FROM: command before RCPT T).
Here is my code:
recStat := utl_smtp.helo(c, vServidor);
vStatus := nvl(vStatus,'') || to_char(recStat.code) ||' '|| recStat.text;
dbms_output.put_line('Status:'||vStatus);
recStat := utl_smtp.mail(c, p_address_from);
vStatus := nvl(vStatus,'') || to_char(recStat.code) ||' '|| recStat.text;
dbms_output.put_line('Status3:'||vStatus);
dbms_output.put_line('p_address_from:'||p_address_from);
dbms_output.put_line('p_address_to:'||p_address_to);
utl_smtp.rcpt(c, p_address_to);
vStatus := nvl(vStatus,'') || to_char(recStat.code) ||' '|| recStat.text;
dbms_output.put_line('Status2:'||vStatus);
-- This is the message
vMensagem := 'MIME-Version: 1.0' || chr(13) || chr(10);
vMensagem := vMensagem ||'From: '|| p_mail_from ||' <'|| p_address_from ||'>'|| chr(13) || chr(10);
vMensagem := vMensagem ||'Subject: '|| p_subject || chr(13) || chr(10);
vMensagem := vMensagem ||'To: '|| p_mail_to ||' <'|| p_address_to ||'>'|| chr(13) || chr(10);
vMensagem := vMensagem ||'Reply-To: '|| p_address_from || chr(13) || chr(10);
So, i call:
- utl_smtp.helo
- utl_smtp.mail
- utl_smtp.rcpt -----> in this i have trouble
anyone can help me? I check the mail from and mail to, and they are correct.
P.S: Sorry, my english is too bad.Hi,
Many mail server provides like gmail use TLS/SSL for mail transmission. The error suggest your mail server is expecting a TLS/SSL connection.
The TLS/SSL connection is not part of the UTL_SMTP and UTL_MAIL API. You have to either use Wallet as described here http://oracleblues.blogspot.in/2010/09/11g-release-2-11202-new-utlsmtp.html or use a third party tunneler like stunnel as described here http://monkeyonoracle.blogspot.in/2009/11/plsql-and-gmail-or-utlsmtp-with-ssl.html
Cheers, -
How do I change the hostname used when Mac Mail sends EHLO
Hi All,
I work for a tech support group and one of our clients is experiencing some trouble sending emails. When they connect to their outbound mail server Mac Mail sends the EHLO command with a hostname like 01:23:45:67:89:ab.home
Another Mac on the network sends a hostname like 00:A0:C9:14:C8:29.home2
So they appear to be the a Mac address for the computers NIC followed by a generic location in this case .home, not sure if thats a generic Mac thing or something they chose to configure but because the hostname is not an ip address and contains ".(dot)home" the outbound mail server our client uses believes it to be a domain so then rejects it as an invalid domain when a lookup on it fails.
I've changed the hostname of one of the Macs using the command "cutil –-set HostName new_hostname"
This has changed the hostname when checking it by the hostname command in a Terminal but Mac Mail still persists in using the old hostname. We've tried rebooting the machine and rebooting the machine with the left shift key held down as I believe this does some kind of rebuild of configuration files, but still the old hostname is send when Mac Mail sends EHLO.
How can I force Mac Mail to pick up the new hostname or is there something else I need to do to change it?
thanks for any assistance you can provide,
MartinReplying to myself:
You can sign out from the account in iBooks and then sign in to another one.
From the menu bar, choose: Store->Sign Out
Then sign in again with the desired ID: Store->Sign In -
Hi experts,
I m using SO_NEW_DOCUMENT_ATT_SEND_API1 function moduel for sending mails to dealers. That is, whenver i execute a Z transaction, the customer invoice details are getting displayed in report output. At the same time, the same output data is sent as mail to the respective dealers.
Now teh user is asking whether there is any possiblity for the end users to have a proof of the mail which is being sent from the Z transaction. If the mail is sent, the end user who executes the Z transaction (mail sending transaction) should have that mail in his/her SENT ITEMS. If the mail not reaches the dealer, then the user must identify the mail bounce identification.
Pls tell me how to achve the same..
Regards,
ShanthiHi,
Yes it is possible..
Just pass 'X' to the exporting parameter 'put_in_outbox'. The user can check the send mail in 'sost'. All the details of the mail will be there. This will be the proof that the mail was sent.
Reg the 2nd part of your query, if the mail is not delivered to any reciepent or to particular recipient, the details will be there in the SAP outbox, that also you can see through transaction 'sost'.
Thanks & Regards
Rocky -
Mail Send Functionality using SO_NEW_DOCUMENT_ATT_SEND_API1
hi,
i m using Fn Module "SO_NEW_DOCUMENT_ATT_SEND_API1" to send email with attachment.
I have written a program which will fetch data in excel format . this excel should be sent as attachment to specified receiver. however i m having difficulties adding attachment to function module.
I specified under parameter "contents_bin" but its giving some error message related wth structure.
I chkd SDN and wasnt able to find any resolution yet.
Any suggestion or idea which can be useful on this.
Thanks.REPORT zsendemail .
PARAMETERS: psubject(40) type c default 'Hello',
p_email(40) type c default 'write email address' .
data: it_packing_list like sopcklsti1 occurs 0 with header line,
it_contents like solisti1 occurs 0 with header line,
it_receivers like somlreci1 occurs 0 with header line,
it_attachment like solisti1 occurs 0 with header line,
gd_cnt type i,
gd_sent_all(1) type c,
gd_doc_data like sodocchgi1,
gd_error type sy-subrc.
data: it_message type standard table of SOLISTI1 initial size 0
with header line.
*START-OF-SELECTION.
START-OF-SELECTION.
Perform populate_message_table.
*Send email message, although is not sent from SAP until mail send
*program has been executed(rsconn01)
PERFORM send_email_message.
*Instructs mail send program for SAPCONNECT to send email(rsconn01)
perform initiate_mail_execute_program.
*& Form POPULATE_MESSAGE_TABLE
Adds text to email text table
form populate_message_table.
Append 'Email line 1' to it_message.
Append 'Email line 2' to it_message.
Append 'Email line 3' to it_message.
Append 'Email line 4' to it_message.
endform. " POPULATE_MESSAGE_TABLE
*& Form SEND_EMAIL_MESSAGE
Send email message
form send_email_message.
Fill the document data.
gd_doc_data-doc_size = 1.
Populate the subject/generic message attributes
gd_doc_data-obj_langu = sy-langu.
gd_doc_data-obj_name = 'SAPRPT'.
gd_doc_data-obj_descr = psubject.
gd_doc_data-sensitivty = 'F'.
Describe the body of the message
clear it_packing_list.
refresh it_packing_list.
it_packing_list-transf_bin = space.
it_packing_list-head_start = 1.
it_packing_list-head_num = 0.
it_packing_list-body_start = 1.
describe table it_message lines it_packing_list-body_num.
it_packing_list-doc_type = 'RAW'.
append it_packing_list.
Add the recipients email address
clear it_receivers.
refresh it_receivers.
it_receivers-receiver = p_email.
it_receivers-rec_type = 'U'.
it_receivers-com_type = 'INT'.
it_receivers-notif_del = 'X'.
it_receivers-notif_ndel = 'X'.
append it_receivers.
Call the FM to post the message to SAPMAIL
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
exporting
document_data = gd_doc_data
put_in_outbox = 'X'
importing
sent_to_all = gd_sent_all
tables
packing_list = it_packing_list
contents_txt = it_message
receivers = it_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.
Store function module return code
gd_error = sy-subrc.
Get it_receivers return code
loop at it_receivers.
endloop.
endform. " SEND_EMAIL_MESSAGE
*& Form INITIATE_MAIL_EXECUTE_PROGRAM
Instructs mail send program for SAPCONNECT to send email.
form initiate_mail_execute_program.
wait up to 2 seconds.
if gd_error eq 0.
submit rsconn01 with mode = 'INT'
with output = 'X'
and return.
endif.
endform. " INITIATE_MAIL_EXECUTE_PROGRAM
Maybe you are looking for
-
Can you have multiple ipods and multiple libraries running on the same computer. I have an Ipod classic, I just purchased an Ipod nano for my wife. Our music aren't completely similar. I would like to have to totally separate libraries on the same co
-
I'm getting this error message "Could not open scratch file because the disk is not available." The disk is mounted and on the desktop. All I did was go into photoshop CS4 and add another scratch area which is one of the Hard drives mounted on the de
-
[SOLVED] Font size issue since recent update
I swear I'm going insane. Since the last round of upgrades (including a kernel update, an nvidia driver update and xorg 1.8) my fonts seem larger and programs which start up windowed (e.g. sakura) are taking up more screen space than before. xrandr c
-
ADF rich client: How to automate testing
Hi Experts, We need to do some automate testing against application that is developed with ADF Faces 11g, I've tried with loadrunner 8.1, which provides 2 approaches to record web applications, web(html / http) and web(click / script). According to m
-
Calendar can't decline the event "(null)" on the exchange server
How can I make this error message go away for good?