Sending email to internet from ABAP
I am trying to send email to external email address thru the standard approach using the function module SO_NEW_DOCUMENT_SEND_API1.
The function module and the abap programs run successfully without errors but still I am not receiving any email on my outlook. I guess there might be some issue with the SAP settings, can anyone help what are all those settings I need to make sure so that an email is sent out from SAP?
Hi Sunil,
Has your BASIS configured the mail server (transaction SCOT)?
Please check this links for SCOT setup.
http://www.sap-img.com/basis/basis-faq.htm
http://www.sapgenie.com/interfaces/sapconnect.htm
Also could you please cut and paste your codes perhaps they are something missing.
Regards,
Ferry Lianto
Similar Messages
-
Sending an email to users from abap program
Hi experts ,
How to send an email to users from abap program ...
i need full coding please..so that i can copy and paste it in my program.
Thank you in advance.
Rajasekhar.PHi Venkat
check the below simple code to convert spool to HTML and email it
data: list type table of abaplist with header line.
data: htmllines type table of w3html with header line.
data: maildata like sodocchgi1.
data: mailtxt like solisti1 occurs 10 with header line.
data: mailrec like somlrec90 occurs 0 with header line.
start-of-selection.
Produce a list
do 100 times.
write:/ sy-index, at 30 sy-index, at 50 sy-index.
enddo.
Save the list
call function 'SAVE_LIST'
tables
listobject = list
exceptions
list_index_invalid = 1
others = 2.
Convert the list
call function 'WWW_LIST_TO_HTML'
tables
html = htmllines.
Send mail
maildata-obj_name = 'TEST'.
maildata-obj_descr = 'Test Subject'.
loop at htmllines.
mailtxt = htmllines.
append mailtxt.
endloop.
mailrec-receiver = '[email protected]'.
mailrec-rec_type = 'U'.
append mailrec.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'HTM'
put_in_outbox = 'X'
tables
object_header = mailtxt
object_content = mailtxt
receivers = mailrec
exceptions
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.
if sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif. -
Error sending emails to Internet: Failed to connect. Winsock error code: 10051
Our exchange 2013 CU2 (CAS+MBX, Win2012) was sending emails to Internet using another server (a kerio email server) and outbound internet email was working as expected.
We have now removed the Kerio server, I also removed the kerio_Send_Connector I was using to send emails to internet and I also changed the email domain in Exchange to be authoritative. I created a new Internet send connector with default values, but the same
bad behavior is present.
Our Exchange 2013 receives emails internally and externally with no problems. The problems are sending emails to Internet. I am suspecting something in the firewall but i need to do some more research.
If from the same Exchange server I telnet to an Internet email host:25 I do get the smtp banner but as soon as I start typing HELO/EHLO I get disconnected and errors are logged.
Errors when sending emails to any emails address (this is from an email sent to google, all others are the same):
Remote Server at aspmx3.googlemail.com (74.125.136.26) returned '400 4.4.7 Message delayed'
7/1/14 9:52:44 a. m. - Remote Server at aspmx3.googlemail.com (74.125.136.26) returned '441 4.4.1 Error encountered while communicating with primary target IP address: "Failed to connect. Winsock error code: 10051, Win32 error code: 10051." Attempted
failover to alternate host, but that did not succeed. Either there are no alternate hosts, or delivery failed to all alternate hosts. The last endpoint attempted was 74.125.136.26:25'
I cannot find any references from such Winsock error that are related to Exchange 2013.
So far all email is being queued at the Exchange Server 2013. I am afraid to install CU3 and make things worse.
Thanks for your comments.Just check if the receive connector settings are set to fine
check the send connector properties and see whether it is set to use DNS to route emails through external DNS/Internal DNS or smart host .
Do a telnet to external domain like hotmail,yahoo and see at what transaction you are getting an error
Enable verbose logging, restart the transport service and check if you get the same error in the verbose logs as well
Get in touch with the ISP and see if the port 25 for Outbound SMTP is opened.
YOu can check if SMTP Proxy is enabled in the firewall. If so disable the SMTP proxy in the firewall and check.
Good Luck!!
Please mark as helpful if you find my contribution useful or as an answer if it does answer your question.
That will encourage me - and others - to take time out to help you.
Regards,
Sathish -
Why am I unable to send email when away from my home wifi ? I am able to receive mail OK, and have double- checked the outgoing server which is correct. This problem is consistent with my Macbook Pro, iPhone, and iPad2.
Attempts to send messages results in them sitting in the Outbox and never- ending 'sending message' displayed.
I am able to send using my me.com server.
Home service provider is Cogeco.
Any help would be appreciated.iOS: Unable to send or receive email
http://support.apple.com/kb/TS3899
Can’t Send Emails on iPad – Troubleshooting Steps
http://ipadhelp.com/ipad-help/ipad-cant-send-emails-troubleshooting-steps/
iPad Mail
http://www.apple.com/support/ipad/mail/
Try a Reset - iPad How-Tos http://ipod.about.com/lr/ipad_how-tos/903396/1/
Or this - Delete the account in Mail and then set it up again.
Cheers, Tom -
When I send emails with photos from iPhoto recipients often tell me images are upside down. What would cause that?
Found this :
https://discussions.apple.com/thread/3431867?start=0&tstart=0
by doing this :
http://www.google.com/search?q=images+are+upside+down+ios -
I am unable to send emails using mail from my btinternet and yahoo accounts similar problem to others with mobile me accounts on lion any suggestions?
Do I need to delete all my email accounts and start again?
-
Sending email to groups from iPad/iPhone
How do you send email to groups from an iPad or iPhone ?
Do all the contacts in the group have a valid email address? What does the server complain about exactly (without revealing the actual email addresses)?
-
My iPhone will not send emails when away from my home wifi
my iphone will not send emails when away from home wifi any advice
Hey craggee,
Thanks for the question. This is usually do to a limitation by your ISP/email provider:
If you are only able to use your email account while connected to your home network, this may be a limitation put in place by your email service provider. For further support, please contact your email service provider directly.
iOS: Troubleshooting Mail
http://support.apple.com/kb/TS3899
Thanks,
Matt M. -
Problem with send email to recipients From recordset behavior
Hello
I use the ^send email to recipients From recordset^ behavior, then words of the subject of sent email stick and the spaces between words in subject removed.
E-Mail charset is utf-8 and language is Persian
for example:
موضوع ايميل من
will be change to:
موضوعايميلمن
notice: spaces are removed
To overcome this problem, please help me
sorry, i'm not good in english
ThanksPersian language is very similar to arabic language
Please help me, I can't solve this problem -
Can I send email using Java from my localhost(Tomcat) with Internet connect
Hi friends,
Please tell me can I send email from my localhost (Tomcat) using Java when my computer is connected to Internet?
I don't have any SMTP username or password or the like, as I found in some codes available in net.
Please suggest and any simple code if possible.
Please don't send me the link of JavaMail API to read.
---SujoyThank you for the link. Though I have not tested the provided code, I will test it.
--Sujoy -
Sending Email using cl_bcs from a badi implementation
Hi,
I have written my code to send Email, inside AFTER_SAVE method of BADI Implementation of DOCUMENT_MAIN01.
Now this method of cl_bcs requires COMMIT WORK for the mail to be sent. And inside BADI implementation, we cannot write a COMMIT statement.
What is a workaround for this? While going through few other posts, I came across remote enabled FMs.
Is that the only way? Can I use some additions like STARTING NEW TASK etc. Following is the call used in case of cl_bcs:
CALL METHOD G_REF_SEND_REQUEST->SEND(
EXPORTING
I_WITH_ERROR_SCREEN = 'X'
RECEIVING
RESULT = G_SENT_TO_ALL ).
I also tried using SO_NEW_DOCUMENT_SEND_API1 STARTING NEW TASK and it works fine. But the subject length is a constraint their.
Please suggest.
Thanks in advance.Hi friend.
*& Report ZTEST_273068_EMAIL_CL_BCS
REPORT ZTEST_273068_EMAIL_CL_BCS.
CONSTANTS:
gc_subject TYPE so_obj_des VALUE 'ABAP Email with CL_BCS',
gc_raw TYPE char03 VALUE 'RAW'.
DATA:
gv_mlrec TYPE so_obj_nam,
gv_sent_to_all TYPE os_boolean,
gv_email TYPE adr6-smtp_addr,
gv_subject TYPE so_obj_des,
gv_text TYPE bcsy_text,
gr_send_request TYPE REF TO cl_bcs,
gr_bcs_exception TYPE REF TO cx_bcs,
gr_recipient TYPE REF TO if_recipient_bcs,
gr_sender TYPE REF TO cl_sapuser_bcs,
gr_document TYPE REF TO cl_document_bcs.
TRY.
"Create send request
gr_send_request = cl_bcs=>create_persistent( ).
"Email FROM...
gr_sender = cl_sapuser_bcs=>create( sy-uname ).
"Add sender to send request
CALL METHOD gr_send_request->set_sender
EXPORTING
i_sender = gr_sender.
"Email TO...
gv_email = '[email protected]'.
gr_recipient = cl_cam_address_bcs=>create_internet_address( gv_email ).
"Add recipient to send request
CALL METHOD gr_send_request->add_recipient
EXPORTING
i_recipient = gr_recipient
i_express = 'X'.
"Email BODY
APPEND 'Hello world! My first ABAP email!' TO gv_text.
gr_document = cl_document_bcs=>create_document(
i_type = gc_raw
i_text = gv_text
i_length = '12'
i_subject = gc_subject ).
"Add document to send request
CALL METHOD gr_send_request->set_document( gr_document ).
"Send email
CALL METHOD gr_send_request->send(
EXPORTING
i_with_error_screen = 'X'
RECEIVING
result = gv_sent_to_all ).
IF gv_sent_to_all = 'X'.
WRITE 'Email sent!'.
ENDIF.
"Commit to send email
COMMIT WORK.
"Exception handling
CATCH cx_bcs INTO gr_bcs_exception.
WRITE:
'Error!',
'Error type:',
gr_bcs_exception->error_type.
ENDTRY.
Just Execute it.
Regards,
Thrimu -
Sending email using Mail from T-Mobile Hot Spot
I cannot send email messages from a Hot Spot using the Mail program. It says it cannot send using the server smtp.mac.com. This is the first problem I've had with this. Today is my first day using a Hot Spot. Has anyone encountered this same issue? Do I have to change some of the settings?
I tried using the Internet based .Mac account and was able to send messages but not directly from Mail program.5. Does T-Mobile provide me with an email account?
T-Mobile does not provide email accounts for its users.
6. Can I access my personal email account through my T-Mobile HotSpot account?
You can access any web-based email account such as Yahoo.com or Hotmail.com. You can also access corporate email accounts if your employer provides you with a virtual private network (VPN) client and a firewall. T-Mobile strongly recommends that its customers take measures to ensure the security of their wireless connections, such as virtual private networks (VPNs), encryption and firewalls. As with any wireless communication, the T-Mobile HotSpot service is not inherently secure and you should ensure you have adequate security safeguards in place. See the Hotspot Security Statement posted on our website for additional information concerning the security of the service and steps you can take to enhance the security of the service.
http://hotspot.t-mobile.com/support_faq.htm#U1 -
I recently migrated my Tbird from a Vista PC to a W7 PC using Mozbackup. Transfer was fine with all the settings transferred apparently correctly. But now I can receive emails but not send them. Sent emails show in 'Sent Items' but are not received the other end. Also tried the migration using the Beta 1 version of Mozbackup and also Windows Easy Transfer with the same result. IMAP and POP3 accounts are both affected. Neither can send emails. I get no error messages nor any bounceback.
Found on one forum that AVG can block outgoing emails so altered the AVG settings which seemed to solve the problem. The next morning the problem was back. I uninstalled AVG completely but it made no difference. I do have MicroSoft Sec Essentials but the problem was there before that was installed.
Using the BT Home Hub 5 on BT Infinity broadband. It can't be the router though as the old PC was sending emails fine. Although I did have the suspect AVG settings, removing it has not solved the problem.
The outgoing email settings seem to be fine. Any thoughts?
SimonRestart the operating system in '''[http://en.wikipedia.org/wiki/Safe_mode safe mode with Networking]'''. This loads only the very basics needed to start your computer while enabling an Internet connection. Click on your operating system for instructions on how to start in safe mode: [http://windows.microsoft.com/en-us/windows-8/windows-startup-settings-including-safe-mode Windows 8], [http://windows.microsoft.com/en-us/windows/start-computer-safe-mode#start-computer-safe-mode=windows-7 Windows 7], [http://windows.microsoft.com/en-us/windows/start-computer-safe-mode#start-computer-safe-mode=windows-vista Windows Vista], [http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/boot_failsafe.mspx?mfr=true" Windows XP], [http://support.apple.com/kb/ht1564 OSX]
-
My Applemail cannot send emails when tethering from Iphone
Hi,
When I tether internet from my Iphone to my laptop, I cannot send emails in applemail.
All other internet connections work fine, It looks to be the iphone perosnal hotspot thats not working.
Has anyone else faced this issue? What is a solution?
Thanks.Most likely because your carrier is doing this to stop spammers.
-
TS1398 sending emails (wi-fi) from ipad 4
I'm unable to send emails from my optus email whilst connected to another wi-fi network even though I can access the internet and receive emails.
Some internet service providers either restrict mail sending to their own network or require different settings (usually including authentication and/or encryption) when sending from other networks.
Another possibility is that the other wi-fi network places restrictions on outbound email, requiring it to go either through their own servers or through authenticated ports on external mail servers.
Ask Optus support for the appropriate settings for authenticated off-network email and adjust your iPad settings accordingly. That should address either set of restrictions.
Maybe you are looking for
-
GUI program... CALCULATE button not working... help please
I am trying to make my GUI work... all buttons work except my CALCULATE button... which I want to say... if Binary radio button is set... and user inputs string into the txtFieldOne.... then when click Calculate - go to my function called "convertBin
-
Can you have two seperate iTunes's on one computer?
Okay, I have and love an iPod nano 4GB White English. I have Windows XP, and I have iTunes on it, but we do not have seperate User Accounts for some reason, we have individual folders. My iTunes is in my folder, our main music "jukebox" program is Wi
-
Working around incompatible pointer via NSImage and NSStatusBar
I'm giving a status bar item an image through NSImage. I'm running into were the app builds and opens in the status bar, but the image I want dosen't display. I receive a warning saying "Incompatible pointer types sending 'NSString' to parameter of t
-
Crash Report: Preview Theme Crashes with Chrome
Hi guys, Playing with the extension I discovered that if Chrome is your default browser (on iMac Lion) when you go to Commands>jQuery Mobile>Preview Theme it crashes Fireworks. I switched my system default browser to Firefox and Safari and it worked
-
How to Translate JMSCorrlationID to MQ 48 hexa digits
I need to transform the JMSCorrelationID into hexad�cimal ascii value and pad it to 48 hexa digits on the right. For example, a function translateCorrelationID make "JUNIT12" become "ID:4a554e495431320000000000000000000000000000000000". Any existing