Difficulty sending mail
cannot send emails from mail.
Are your accounts offline from an attempt to send while there was no internet connection? If they are offline there will be little lightening bolt next to each account. To place the accounts back on line click the lightening bolt OR select the menu item "Mailbox > Take All Accounts Online".
You should also make sure you have an internet connection.
Also try quitting mail and restarting mail. Finally try restarting the computer.
Similar Messages
-
Have difficulty sending mail from iPad 2
I am having difficulty sending an e-mail from my iPad 2. I am using Telus as my server and I can't find a solution?
Thanks for contributing your answer and welcome to Apple Discussions!
Pointing out deficiencies in someone's posts is not necessarily insulting and you'll have to take it as an article of faith that when I do set out to be deliberately insulting there is no ambiguity involved. I also do not agree that pointing out those deficiencies is not helpful, as I believe they are: While OP will not have his question answered (nor, indeed, could he have done), both he and others reading the thread might come away with the idea that a bit more care and attention taken in the writing up of their questions will immediately result in more and better and quicker responses and solutions to them.
I'm glad, as we all are, that your solution worked for you and, unlike the vast majority of newer users here, you did at least take the trouble to post it up and share it. Let me ask you, though: What do you plan on doing when OP (stands for Original Poster, btw) comes back with the common, "Yeah, I tried that, it didn't work, what else should I do?" response? Make a few more guesses? Ask a few more questions? Shrug and move along?
The following is the alternate boilerplate that I quite frequently toss up in these sorts of situations which, funnily enough, will also occasionally generate the same sort of reproving responses:
I don't understand what you're saying. Please try the following if you'd like to save yourself and others a lot of time:
Describe what you are trying to do
Describe how you are trying to do it, in as much detail as you can.
Describe what you expect to see or have happen when you do it that way
Describe what you see or what happens instead of what you expected; include any error messages that appear.
Provide some idea of what you have already looked at or already tried doing to fix the problem, along with the results of those attempts. -
Difficulty sending mail to secure SMTP, SMTPAddressFailedException: 554
I keep getting the following exception in my application:
class com.sun.mail.smtp.SMTPAddressFailedException: 554 <[email protected]>: Recipient address rejected: Relay access denied
My code is as follows:
public class SMTPSender {
private Session session;
public SMTPSender() {
Properties props = new Properties();
props.setProperty("mail.smtp.host", AutomailingUtility.HOST);
props.put("mail.smtps.auth", AutomailingUtility.AUTH);
props.put("mail.smtp.port", "465");
props.put("mail.smtp.socketFactory.port", "465");
props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
props.put("mail.smtp.socketFactory.fallback", "false");
Authenticator auth = new MyAuthenticator(AutomailingUtility.USERNAME, AutomailingUtility.PASSWORD);
session = Session.getInstance(props, auth);
public void sendMessage(String toUser, String message, String subject) {
try {
Message msg = new MimeMessage(session);
msg.setSubject(subject);
msg.setSentDate(new Date());
InternetAddress ia = new InternetAddress(AutomailingUtility.FROM_ADDRESS);
msg.setFrom(ia);
msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(toUser + "@mail.gatech.edu"));
msg.setText(message);
Transport.send(msg);
} catch (AddressException e) {
e.printStackTrace();
} catch (MessagingException e) {
e.printStackTrace();
}All the Automailing constants are strings.
I'd appreciate the helpThe code? For regular SMTP with authentication I believe you needprops.put("mail.smtp.auth", "true");whereas you set up the mail.smtps.auth property instead. However I don't have any experience with secure SMTP, so I don't know what's right in that case. Are those other applications you mention using secure SMTP or just regular SMTP?
-
Cannot send mail from any mail account
I have a Mac Mini, late 2014 model, running OS X Yosemite version 10.10.2. I have constant difficulty sending mail from any of my mail accounts; these are iCloud, Googlemail, Yahoo and a personal one which uses 123-reg.co.uk. I am currently located in Greece, but have been having trouble for ages, even in the UK. I can receive mail, but I don't seem able to send it. Error message is usually simply cannot send mail using this server, select a different server. However, when connection doctor is run, all servers appear to be connected and I am logged in. Any ideas please?
rosiehwilson wrote:
Hi, not sure why that is relevant, but we arrived at the end of January this year. Here is a screen shot of a recurring problem, although in this case Gmail is not connected to the internet, which it usually is. Hope this helps.
Your outgoing Gmail servers not working, everything else seems OK.
So, what is not working for you (other than Gmail Sending) -
Problems sending mail after update
Is anyone having difficulty sending mail after the most recent ipad IOS update? Getting message saying that cannot connect to outgoing server. Know server is fine for other apple devices.
Can you receive emails on the account?
Reset/restart your router and try gain.
Try deleting the account and setting it up again. -
I have difficulty sending photos through iPhoto 11 often get a connection error. When I go to my email and copy the photos in email the emails go out right away and never seem to have a connection problem? Why did they cahnge the process for sending photos form iphoto?
It is an addition option some people like and other do not (I do not) -- to use it as always is trivial - in the iPhoto preferences set Apple Mail as the e-mail client
LN -
TS3274 Internet fine but email just says no service can send mail but not recieve
iPad says no service,can use Internet and send mail just do not recieve any
Hey Unitrode,
Welcome to Apple Support Communities, and thanks for the question. If you're experiencing difficulty with email on your iPad I'd check out the following troubleshooting steps, especially step 5:
iOS: Unable to send or receive email
http://support.apple.com/kb/ts3899
All the best,
David -
Why all of a sudden am I having difficulty sending Gmail emails? I get a send error. When I run diagnostics there is a SMTP and IMAP account for Gmail and I am not sure how to fix this.
Hi jodilynnf,
When using Connection Doctor to see what is could be causing the issue, look for the red dots to let you know what is wrong. Then all you have to do is correct that information. You can double click on the section that is giving you issue and it will take you there. Most issues could be just password being entered incorrectly. Take a look at the article below to walk you through troubleshooting issues with Mail.
OS X Mail: Troubleshooting sending and receiving email messages
http://support.apple.com/en-us/TS3276
Take it easy,
-Norm G. -
Hi,
I have two different IMAP accounts, and I can't send mail with either of them. I receive it just fine, but can't send. One of them just switched to ESMTP (I'm not entirely sure what that means), and said that many mail programs are not yet compatible with it. I know that both accounts can send, as I can send from them on the web.
I have tried switching from port 25 to port 587, with no luck. Regardless of what I do, the program displays a window saying, "Sending the message content to the server failed." I haven't been able to send for a little over a week now. Any help would be greatly appreciated.
ThanksTonight I have been suddenly unable to send e-mail from my mac.com address.
The problem is the same whether I try to send from my G4 laptop running OS 10.4, or my eMac running OS 10.3.9 , or from .mac web mail.
The alert I am receiving says: "The sender address [email protected] was rejected by the server."
I am using the SMTP outgoing mail server, not POP.
I can still receive e-mail with no difficulty.
I have changed no settings.
What's up? -
Sending mail via forms no longer working
Recently, on one of our servers (XServe G4 - 10.3.9) was running both web and mail. Mail was moved off of the server 2 days ago onto a newer server (10.4.7)
The web server has: php4.3.11 and is ONLY running AFP/OD/Web
Since the transfer of the mail server to the new machine, all web sites can no longer send mail via their scripts (either by sendmail, php's mail(), or by connecting to SMTP server via php).
The web logs do not show errors when it attempts to send the mail...
A look at mail.log shows
"relay=cyrus, delay=2558, status=deferred (temporary failure. Command output: couldn't connect to lmtpd: Connection refused_ 421 4.3.0 deliver: couldn't connect to lmtpd_)
As far as I'm aware, the web server/sendmail shouldn't be attempting to use cyrus at all. For the record, Cyrus master is not running.
All users can access the mail server without any difficulty. DNS entries have been checked and double checked.
Does anyone know why sendmail and php mail functions stopped working? I really need to get these web forms functioning again. Is the problem with apache, php, sendmail or something else?Hi Camelot,
Thanks for the quick reply and useful suggestion. I did as you mentioned and fired up the mail server.
The mail "delivered" however, I notice a couple issues in the logs (mail.log)
issue #1: I have to start cyrus master manually via > sudo /usr/bin/cyrus/bin/master SA and command line start/stop of mail does not start master. Also, when starting master from command line as mentioned, terminal hangs.
issue #2 (from mail.log) - still getting the same lmtpd error (but messages do finally get delivered):
Jan 14 03:58:24 www postfix/pipe[2914]: 3503858502D: to=<[email protected]>, relay=cyrus, delay=5327, status=deferred (temporary failure. Command output: couldn't connect to lmtpd: Connection refused_ 421 4.3.0 deliver: couldn't connect to lmptd_ )
Jan 14 03:59:39 www postfix/cleanup[2906]: B60AE58572B: to=<[email protected]>, relay 123.123.123.123[123.123.123.123], delay=0, status=sent (250 Ok: queued as 9FBF41BCBCA)
Do you think these are "issues" to contend with or are they "normal" occurances? -
HI all,
I am new to both Java and Apache James. Please help me. I just installed Apache James 1.2.1. It seems to work fine. Because I can use MS Outlook express and send mail and receive it(I set up couple users and mail from one address to other). The host is localhost(I am connected to internet). But when i try to send mail say for example to hotmail domain or yahoo domain, I dont
see mail being delivered. But MS outlook express does not show any error when I do send/receive either.
Could somebody explain me if I am missing any config on Apache James that is not delivering the mail.Hi everyone,
Currently, I am working on a project which requires email facilities.... I have chosen JAMES mail server....
But I have some difficulty to make it work properly.... Hence, Is it possible to send me a working sample of the config.xml.... Course I have problems in configuration....
So far...I have run the server and added a few users.... I test it out with the mailclient.java, but I get authenticate errors and pop3 error....
Thanks for all your time..... -
UnsupportedDataTypeException when sending mail from Java application
I try to get the Java Mail API running. I'm able to compile all sample programs delivered with the API but when I try to run e.g. msgsend, msgsendsample or a sample that I found in this discussion (zmail from zakir_sh), I always get the same error:
javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: IOException while
sending message;
nested exception is:
javax.activation.UnsupportedDataTypeException: no
object DCH for MIME type text/plain; charset=us-ascii
Does anybody has the same problem? What's going wrong?Initially, I too had difficulty with JavaMail, mainly because I did not read the documentation carefully enough.
I bypassed msgsend, etc. and wrote a very basic program to send mail; fired up my dial-up-connection and everything worked beautifully.
Try the same. If you don't succeed, post your code here.
Good luck. -
How to send Mail in case of Output Determination - Transmission medium 5
Dear Friends,
I have a below requirement.
- Create custom output type having Transmission medium 5, which triggers on creation of order.
- Write driver program attached to that output type that sends e-mail to the person who has created the order.
- Mail contain information regarding pricing for individual line item wise.
I have gone through many posts but not sure about process of generate the mail in case of Transmission medium 5.
My query is:
Do we require to write FM (SO_NEW_DOCUMENT_ATT_SEND_API1) to send e-mail to respective person or it will take care by system (Transmission medium 5)?
If FM not required then how can we write code that triggers the mail to specific mail ID?
NilayYes, for your custom requirement you will have to create a Z report.
LIke your requirement must be to put something specific in mail body or attach something with mail. All this will not be catered by the standard report maintained against your output type and transmission medium.
As i understand for any output type a message is triggerd and stored in database table (like NAST) and then these requests are picked by standard report (like RSNAST00). These reports then in return call the Program/form maintained against the ouptut type and transmission medium (table TNAPR).
So i would suggest that create a custom report and use the FM for sending mails. These FMs are pretty simple to use. Find a sample code in the below link:
[http://wiki.sdn.sap.com/wiki/display/ABAP/SendExternalMailwithattachment] -
Sending mail with multiple attachment
hi.
i want to send mail with multiple attachment.
i m succeed in sending multiple attachment but the second pdf is not open.
its given error like "This file is damaged and could not be open.
pls check my code. and
give the solution....
point should be assured...........
hope all u r understand my problem..
& tell me where is i m missing something.
REPORT YSDPASALE1_MAIL LINE-SIZE 110.
data : year_month(6) type c.
data : from_date like sy-datum,to_date like sy-datum.
INITIALIZATION.
year_month = sy-datum+0(6).
CONCATENATE year_month '01' into from_date.
to_date = sy-datum.
ranges : temp for mkpf-budat.
temp-low = from_date.
temp-high = to_date.
append temp to temp.
DATA: P_JOBCNT LIKE TBTCJOB-JOBCOUNT,
jobname like TBTCJOB-JOBNAME,
L_RELEASE(1) TYPE c.
CONSTANTS : l_c_device(4) VALUE 'LOCL'.
DATA : t type i value 0.
DATA : p_email1 like somlreci1-receiver,
p_sender LIKE somlreci1-receiver.
Data Declaration
DATA: gd_recsize TYPE i,gd_recsize1 TYPE i.
Spool IDs
TYPES: BEGIN OF t_tbtcp.
INCLUDE STRUCTURE tbtcp.
TYPES: END OF t_tbtcp.
DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
wa_tbtcp TYPE t_tbtcp.
Job Runtime Parameters
DATA: gd_eventid LIKE tbtcm-eventid,
gd_eventparm LIKE tbtcm-eventparm,
gd_external_program_active LIKE tbtcm-xpgactive,
gd_jobcount LIKE tbtcm-jobcount,
gd_jobname LIKE tbtcm-jobname,
gd_stepcount LIKE tbtcm-stepcount,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
DATA: w_recsize TYPE i.
DATA: gd_subject LIKE sodocchgi1-obj_descr,
it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
it_mess_att1 LIKE solisti1 OCCURS 0 WITH HEADER LINE,
it_mess_att2 LIKE solisti1 OCCURS 0 WITH HEADER LINE,
gd_sender_type LIKE soextreci1-adr_typ,
gd_attachment_desc TYPE so_obj_nam,
gd_attachment_desc1 TYPE so_obj_nam,
gd_attachment_name TYPE so_obj_des,
gd_mtitle LIKE sodocchgi1-obj_descr.
Spool to PDF conversions
DATA: gd_spool_nr LIKE tsp01-rqident,
gd_destination LIKE rlgrap-filename,
gd_bytecount LIKE tst01-dsize,
gd_buffer TYPE string.
CONSTANTS: c_dev LIKE sy-sysid VALUE 'DEV',
c_no(1) TYPE c VALUE ' ',
c_device(4) TYPE c VALUE 'LOCL'.
Binary store for PDF
DATA: BEGIN OF it_pdf_output OCCURS 0.
INCLUDE STRUCTURE tline.
DATA: END OF it_pdf_output.
DATA: BEGIN OF mailstr OCCURS 0,
p_email like somlreci1-receiver,
END OF mailstr.
DATA: mailtab like STANDARD TABLE OF mailstr WITH HEADER LINE.
DATA: ypp18tab like STANDARD TABLE OF mailstr WITH HEADER LINE,
ymis008tab like STANDARD TABLE OF mailstr WITH HEADER LINE,
ysd15tab like STANDARD TABLE OF mailstr WITH HEADER LINE,
ymis10tab like STANDARD TABLE OF mailstr WITH HEADER LINE.
SUBMIT YSDPASALE1 with bdt in temp
to sap-spool
with line-size = '255'
with KEEP_IN_SPOOL = 'X'
with IMMEDIATELY = ' '
WITHOUT SPOOL DYNPRO
AND RETURN
NEW-PAGE PRINT ON
DESTINATION l_c_device
IMMEDIATELY ' '
KEEP IN SPOOL 'X'
NEW LIST IDENTIFICATION 'X'
NO DIALOG.
new-page print off.
IF sy-batch EQ 'X'.
PERFORM get_job_details.
PERFORM obtain_spool_id.
PERFORM convert_spool_to_pdf.
select yemail as p_email into CORRESPONDING FIELDS OF TABLE ymis008tab
from ymail
where ytcode = 'YMIS008'.
ELSE.
SKIP.
WRITE:/ 'Program must be executed in background in-order for spool & mail sending',
'request to be created.'.
ENDIF.
wait up to 3 seconds.
submit YSD_MONTHLY_SALES
USING SELECTION-SET 'MAIL'
to sap-spool
with KEEP_IN_SPOOL = 'X'
with IMMEDIATELY = ' ' "SPACE
WITHOUT SPOOL DYNPRO
AND RETURN
NEW-PAGE PRINT ON
DESTINATION l_c_device
IMMEDIATELY ' '
KEEP IN SPOOL 'X'
NEW LIST IDENTIFICATION 'X'
NO DIALOG.
new-page print off.
IF sy-batch EQ 'X'.
gd_attachment_desc1 = 'YMIS10'.
gd_mtitle = 'Monthly Sales Report'.
PERFORM get_job_details.
PERFORM obtain_spool_id.
PERFORM convert_spool_to_pdf1.
loop at it_mess_att.
move it_mess_att1 to it_mess_att.
APPEND it_mess_att.
endloop.
APPEND LINES OF it_mess_att1 to it_mess_att.
free it_mess_att1.
it_mess_att[] = it_mess_att1[].
insert LINES OF it_mess_att1 into it_mess_att.
APPEND LINES OF it_mess_att2 to it_mess_att .
insert LINES OF it_mess_att1 into it_mess_att.
insert LINES OF it_mess_att2 into it_mess_att.
loop at ymis008tab into mailstr.
p_email1 = mailstr-p_email.
p_email1 = '[email protected]'.
PERFORM process_email.
endloop.
clear mailstr.
wait up to 5 seconds.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ELSE.
SKIP.
ENDIF.
FORM obtain_spool_id *
FORM obtain_spool_id.
CHECK NOT ( gd_jobname IS INITIAL ).
CHECK NOT ( gd_jobcount IS INITIAL ).
SELECT * FROM tbtcp
INTO TABLE it_tbtcp
WHERE jobname = gd_jobname
AND jobcount = gd_jobcount
AND stepcount = gd_stepcount
AND listident <> '0000000000'
ORDER BY jobname
jobcount
stepcount.
READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
IF sy-subrc = 0.
message s004(zdd) with gd_spool_nr.
gd_spool_nr = wa_tbtcp-listident.
MESSAGE s004(zdd) WITH gd_spool_nr.
ELSE.
MESSAGE s005(zdd).
ENDIF.
ENDFORM.
FORM get_job_details *
FORM get_job_details.
Get current job details
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.
ENDFORM.
FORM convert_spool_to_pdf *
FORM convert_spool_to_pdf.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
CHECK sy-subrc = 0.
Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf_output.
TRANSLATE it_pdf_output USING ' ~'.
CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~ '.
DO.
it_mess_att = gd_buffer.
APPEND it_mess_att.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
ENDFORM.
FORM convert_spool_to_pdf1.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
CHECK sy-subrc = 0.
Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf_output.
TRANSLATE it_pdf_output USING ' ~'.
CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~ '.
DO.
it_mess_att1 = gd_buffer.
APPEND it_mess_att1.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
ENDFORM.
FORM process_email *
FORM process_email.
DESCRIBE TABLE it_mess_att LINES gd_recsize.
DESCRIBE TABLE it_mess_att1 LINES gd_recsize1.
CHECK gd_recsize > 0 or gd_recsize1 > 0.
PERFORM send_email." USING p_email1.
perform send_email using p_email2.
ENDFORM.
FORM send_email *
--> p_email *
FORM send_email." USING p_email.
CHECK NOT ( p_email IS INITIAL ).
REFRESH it_mess_bod.
Default subject matter
gd_subject = 'Subject'.
gd_attachment_desc = gd_attachment_desc1 .
gd_attachment_desc = 'YPP18 - Daily Highlights'.
CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
it_mess_bod = 'Dear Sir,'.
APPEND it_mess_bod.
it_mess_bod = ' '.
APPEND it_mess_bod.
it_mess_bod = ' '.
APPEND it_mess_bod.
it_mess_bod = 'kindly find the attached document'.
APPEND it_mess_bod.
it_mess_bod = ' '.
APPEND it_mess_bod.
it_mess_bod = 'Do not reply on this mail, It is generated from SAP'.
APPEND it_mess_bod.
it_mess_bod = ' '.
APPEND it_mess_bod.
it_mess_bod = ' '.
APPEND it_mess_bod.
it_mess_bod = 'Regards,'.
APPEND it_mess_bod.
it_mess_bod = 'Arpit Shah'.
APPEND it_mess_bod.
If no sender specified - default blank
IF p_sender EQ space.
gd_sender_type = space.
ELSE.
gd_sender_type = 'INT'.
ENDIF.
Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
tables it_mess_bod
it_mess_att
it_mess_att1
using "p_email
gd_mtitle
'Testing mail generated from SAP'
'Daily Highlights Abstract Report - YPP18'
'PDF'
gd_attachment_name
gd_attachment_desc
p_sender
gd_sender_type
changing gd_error
gd_reciever.
ENDFORM.
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
Send email
FORM send_file_as_email_attachment tables it_message
it_attach
it_attach1
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.
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,w_doc_data1 like sodocchgi1.
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_data1-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[] = it_attach[].
For 2nd Attachments
* Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach1 INDEX w_cnt.
w_doc_data-doc_size = w_doc_data1-doc_size +
( w_cnt - 1 ) * 255 + STRLEN( it_attach1 ).
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.
APPEND LINES OF it_attach1 to t_attachment.
t_attachment[] = it_attach1[].
APPEND LINES OF it_attach1 to t_attachment.
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 = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
DESCRIBE TABLE it_mess_att LINES t_packing_list-body_num.
DESCRIBE TABLE it_attach LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = 'YMIS008'."ld_attdescription.
t_packing_list-obj_name = 'YMIS008'."ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
clear t_packing_list.
for 2 attachments
data : a type i,b type i.
a = t_packing_list-body_num.
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = a + 1. "1
DESCRIBE TABLE it_mess_att1 LINES t_packing_list-body_num.
DESCRIBE TABLE it_attach1 LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = 'YMIS10'."ld_attdescription.
t_packing_list-obj_name = 'YMIS10'."ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
a = t_packing_list-body_num.
clear 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 = a + 1.
t_packing_list-body_num = t_packing_list-body_num + 1.
DESCRIBE TABLE it_mess_att1 LINES t_packing_list-body_num.
t_packing_list-body_num = a + t_packing_list-body_num .
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = 'YMIS10'."ld_attdescription.
t_packing_list-obj_name = 'YMIS10'."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.
loop at ymis008tab into mailstr.
t_receivers-receiver = mailstr-p_email. "ld_email.
t_receivers-receiver = p_email1.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'. "X "Read Acknoledgement
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
endloop.
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.
Rgds.
ArpitHi Arpit,
Take a look at the documentation of FM 'SO_DOCUMENT_SEND_API1' for parameter PACKING_LIST. I think you should set t_packing_list-head_num to a different value than 0 for the second attachment.
Regards,
John. -
Hi,
I am working on Sender Mail Adapter. I have done the total configuration but unable to sucess the scenarios. In the CC monitoring, it is saying that "Not Intialised" Even though i send and receive the messages from My Lotus Notes Inbox. I activated all the objects.
I have done the following examples:
Transport Protocal: POP3
Message Protocal: XIALL
Given the URL and UserId and PWD also
Poll Intevel: 1 (Mins)
Adapter Status: Active
Please help to me solve this problem. I already raised the one more thread today but didn't get solutions.
<b>Note: Do i need to do any setting from the Lotus notes(Mail Server) to diver my messages.</b>
Thanks in Advance,
<b>I found the problem with SMTP Address. Can i use the SMTP Url for POP3 or IMP4 protocal. Is there any thing else because if i use the Same SMTP Address, it is giving exception</b>
Best Regards,
Vijay
Message was edited by:
Gangisetty Vijaya Bhaskarudu
Message was edited by:
Gangisetty Vijaya BhaskaruduHi Gangisetty,
SMTP is the out going server(for sending mails out) while POP3 is the in coming(receiving mails) server. So for a sender channel, you need to use the POP server details not SMTP.
cheers
danus
Maybe you are looking for
-
Hi, I am getting this error since recently when I am using my MBP: "Because a USB device was drawing too much power from your computer..." The 'funny' thing: there is no USB device attached to the computer (only power and monitor cables). Why is this
-
Backing up iPad to a different computer
Question: I have a full iPad, and want to back it up to a new (to it) laptop. Details: My macbook pro died (water spill). My time machine is out of date--it went out of sync four months ago, and I hadn't gotten around to setting up a new one. I'm
-
InDesign CS5 won't package documents
I'm running CS5 and have recently had a problem when i try to package files in InDesign. The task bar runs until approx. 50% then stalls and the programme starts to 'spin'. The task bar will slowly edge up to about 75% which can take to to 20 minutes
-
I don't want tlf scrolling. i have set cc=new ContainerController(container,rect.width, NaN); cc.verticalScrollPolicy=ScrollPolicy.OFF; i have own scroll via tween container.scrollRect of container sprite. But when I select text and move mouse down,
-
Users with different delivery dates
Hi , Two users entering a sales order with same master data of customer, material and quanty are having different delivery date at item level? Any reasons? Thanks, Pramod