Installing Send mail on Solaris 10
Hi,
I need to install the send mail on Solaris 10, could you please let me know the installing procedure and the configuration about this.
Many Thanks
karthick
It should work by default, but if it isn't, you may want to configure your relay mailer.
Edit the /etc/mail/sendmail.cf and find the lines:
# "Smart" relay host (may be null)
DS
Change to:
# "Smart" relay host (may be null)
DSyourcompanymailserver.company.com
Stop and start sendmail and then test it out.
Similar Messages
-
Error during sending mail from solaris 9
Hi All,
I am trying to send mail from solaris machine.I am using sendmail 8.12.9+Sun.When I am trying to send mail a mail using
#echo "Test mail"|mailx -s "welcome to Solaris" [email protected]
#it is execuitng sucessfully but when I am seeing the /var/log/syslog file,then It showing the error--
/etc/mail/aliases.db out of date
Aug 6 15:51:33 mgsun sendmail[823]: [ID 801593 mail.notice] n76ALXfa000823: <Sang@mgsun>... User unknown
Aug 6 15:51:33 mgsun sendmail[813]: [ID 801593 mail.info] n76ALXZo000813: to=Sang, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31096, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown
00823: from=<>, size=1096, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
00813: n76ALXZp000813: return to sender: User unknown
Aug 6 15:51:33 mgsun sendmail[823]: [ID 801593 mail.info] n76ALXfc000823: from=<>, size=3566, class=0, nrcpts=1, msgid=<200908061021.n76ALXZp000813@mgsun>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Aug 6 15:51:33 mgsun sendmail[813]: [ID 801593 mail.info] n76ALXZp000813: to=postmaster, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32120, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (n76ALXfc000823 Message accepted for delivery)
Aug 6 15:51:33 mgsun sendmail[824]: [ID 702911 mail.info] alias database /etc/mail/aliases.db out of date
Aug 6 15:51:33 mgsun sendmail[824]: [ID 801593 mail.info] n76ALXfc000823: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=33739, dsn=5.3.0, stat=unknown mailer error 5
Aug 6 15:51:33 mgsun sendmail[824]: [ID 801593 mail.info] n76ALXfc000823: n76ALXfY000824: postmaster notify: unknown mailer error 5
Aug 6 15:51:33 mgsun sendmail[824]: [ID 801593 mail.info] n76ALXfY000824: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31024, dsn=5.3.0, stat=unknown mailer error 5
Aug 6 15:51:33 mgsun sendmail[824]: [ID 801593 mail.info] n76ALXfY000824: n76ALXfZ000824: return to sender: unknown mailer error 5
Aug 6 15:51:33 mgsun sendmail[824]: [ID 801593 mail.info] n76ALXfZ000824: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31024, dsn=5.3.0, stat=unknown mailer error 5
Aug 6 15:51:33 mgsun sendmail[824]: [ID 801593 mail.alert] n76ALXfY000824: Losing ./qfn76ALXfY000824: *savemail panic*
Aug 6 15:51:33 mgsun sendmail[824]: [ID 801593 mail.crit] n76ALXfY000824: SYSERR(root): s*avemail: cannot save rejected email anywhere*Please help me to resolve it.
Thanks in advance..Here's some pointers on troubleshooting sendmail:
[http://docs.hp.com/en/B2355-90110/ch05s08.html]
and
qualify my own domain
[http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=149991]
newaliases error - Executable files not allowed
[http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=39966]
HP forums can be good for SUN too. :) -
I have used javax.mail package for sending mail options in a web application on Windows.Can I use the same in Solaris ??
Thanks in advance!!Yes.
-
Unable to send out mails from Solaris 10 Server
We are in the process of migrating all our Solaris 8 servers to Solaris 10 servers. I have installed core distribution of Solaris 10 with only ssh running and few additional packages such as SUNWntp etc. which do not come with Core. I do not want to run sendmail daemon, but be able to send out emails from this host. I tried adding smart host DS entry in /etc/mail/sendmail.cf - I tried both hand editing of this file and compiling a new one to hardcode smarthost entry -. But mailing works only when sendmail daemon is running otherwise, I am unable to sendout mails. Can you please share your knowledge to resolve this issue.
Thanks,
KarthikI use /etc/mail/aliases file and I do not run sendmail on any of my servers.
I have an entry for root aliased to <my.email.address>,<my.coworker.email.address> so any system messages are sent to us at our corp email addresses. Our servers are setup to use corporate DNS which includes entries for corp. mail servers.
HTH
John
Edited by: SolarisSAinPA on Apr 2, 2008 2:02 PM
This method worked for Solaris8. I'm having somedifficulty making it work for Solaris10. We have no mailhost definition in DNS, so I'm not sure if that is why this does not work or is there something specific to Solaris10 that prevents me from using the method I describe earlier.
If I caused you extra work/confusion because of my earlier post, my apologies.
John -
Newbie question: how to send mails on a Solaris 10 machine?
Good morning all,
I am responsible of a lab, containing some Solaris machines.
On one of those machines, a collegue would like to send mails, using following command:
echo "something" | mailx -v -s "subject" <collegue>@<domain>.comThe mentioned e-mail address is configured on an MS Exchange server.
On first sight this server is not accessible from the lab:
telnet>ping -a <Exchange_Server>.<domain>.com
ping: unknown host <Exchange_Server>.<domain>.comHowever when I try this in a DOS prompt, I get the same result:
DOS prompt>ping -a <Exchange_Server>.<domain>.com
Ping request could not find host <Exchange_Server>.<domain>.com=> How can I determine whether the Exchange server is accessible from the lab?
Even more general: how can I determine whether the machines in the lab are connected to the internet:
telnet>ping www.hotmail.com
no answer from www.hotmail.com(94.245.116.9)
no answer from www.hotmail.com(157.55.0.137)=> if there is no connection to the internet, how can my machine translate URLs into IP addresses?
Can anybody give me a start?
Thanksfirst ask your exchange team to add the Solaris server to exchange relay..then only soalris server can send mails...
once they added..
take the mail server ip/hostname
configure /etc/mail/sendmail.cf
modify DS to
DSmailserver ----if dns server works
else
DS[mailserver] ---lookup through /etc/hosts -
Can't send mail in IMAP accounts after installing Mavericks. Incoming messages OK.
I'm unable to send mail in IMAP accounts after installing Mavericks. Incoming is OK. Any suggestions on how to resolve, please?
I'm afraid that I have the very same problem. How did Apple not see this. Surly email is a major part of any opperating system and should have being more than double checked before releasing. I understand software glitches but this is a major pain in the backside. I'm totally stuck and can't use my macbook pro
-
Please..how to instal "libero" mail on my Ipad. I need the parameter for send and receive mail..Thanks
FYI: POP will by default, delete messages from the server after downloading them (This applies to most pop clients, computer or mobile). POP is old tech and is not recommended if IMAP or Exchange are available. The default when setting up a g-mail type account is IMAP. Full synchronization with the server. You may also be able to set it up as an Exchange account, allowing for push e-mail and sync of calendars and contacts as well. See the Gmail help pages for instructions.
-
Installed Server, Got certificate added in server and Mac keychain. Can't Send Mail
Hi,
I dove into server tonight. In a fit of overconfidence, I installed it on my main Macintosh as it is the only compatible machine. I wanted to run it while doing other things so i put it on my main login. I got a certificate from my Godaddy account and got it installed on server. I quit server and opened Mail and I cant send mail as it is trying to use the new certificate I believe. I downloaded and added the certificates to keychain and I see them.
The Message: An error occured while trying to sign this message with a certificate from "$%^[email protected]". Verify that your certificate for this address is correct and the private key is on your keychain.
How can I either make the certificate work for mail, add the private key to my keychain or delete the key so that mail uses whatever it was previously using?
Thanks A Million!
VcPragman,
I surely could be confusing the two. I actually didn't want to do anything with mail in server yet. I installed server. Spent some time trying to get it set up, quit server and returned to my normal (client) work. I tried to send an email from my main account and got an error message in the client mail app referring to the certificate.
The Message: An error occured while trying to sign this message with a certificate from "$%^[email protected]". Verify that your certificate for this address is correct and the private key is on your keychain.
I have had the domain name and the cretificate came in that package. I was not even going to make it available to the outside world for some time. I just wanted the server up so i could practice working with it. I am moving from strictly creative IT (logic, Pro Tools etc.) to an environment that is more corporate and requires a bit of server knowledge. Luckily i have a bit of time to learn about it. i am obviously clueless as of now.
Sincere thanks for your help.
V -
Cannot send mail since installing mountain lion
I'm using aol mail. I receive mail with no problems. Since installing Mountain Lion on my new Mac when I try to send mail I get a message that I can't send using aol server. Mail settup indicates everything is working fine. I have no problems sending mail with a Macbook Pro and a PC on the same wireless network.
This seemed to work for me: First be sure all your mail is stored on the server (eg AOL) or you may lose it. If it is NOT stoerd on the server, DON'T DO THIS
In Mail Preferences / accounts, use the -(minus) sign to delete All of your accounts one by one
Now use the + to add account, and reinstall all of your accounts one by one.
It does seem to work and mail is now sent -
Mail does not sending emails , and i can't install the mail update.
Hi
i have a problem with out going mail after install
OS X 10.9.1 (13B42)
mail app : Version 7.1 (1827)
when im sending an email its not being send, the email move to outbox , and stays there , sometimes its send it after i restart mail app , but still the email been kept in the out box ,(from what i know it should move to the "sent box".
i have tried to remove and install OS x a few times , nothing change .
i have tried to downloud and install the mail update from the support page , and it gives me this :
help pleaseSometimes booting into the Safe Mode works.
Safe Mode
Safe Mode - About -
Can no longer send mail after installing Yosemite
can no longer send mail after installing Yosemite
Hi nwpmike,
When I uncheck "SSL" it's working well, but it's not very secure. When I leave SSL, I got in "Connection Doctor" the message "Trying to log in to this SMTP account failed. Verify that the username and password are correct.", only for the SMTP. For the IMAP, the status in Green. It's also working well on the iPhone 6 with ios8 and other mac with OS X 10.9 and previous versions.
The only thing that can be involved is that the certificat used by my mail provider is expired.
With connection docteur, there is a button "Show Details". Here is the conversation when connecting to the smtp.
READ Oct 18 23:33:53.363 [kCFStreamSocketSecurityLevelNone] -- host:smtp.planet-service.fr -- port:587 -- socket:0x6000014a58e0 -- thread:0x600001e6fbc0
250-smtp.planet-service.fr
250-AUTH LOGIN CRAM-MD5 PLAIN
250-AUTH=LOGIN CRAM-MD5 PLAIN
250-STARTTLS
250-PIPELINING
250 8BITMIME
WROTE Oct 18 23:33:53.363 [kCFStreamSocketSecurityLevelNone] -- host:smtp.planet-service.fr -- port:587 -- socket:0x6080010b1400 -- thread:0x600003479b00
STARTTLS
WROTE Oct 18 23:33:53.363 [kCFStreamSocketSecurityLevelNone] -- host:smtp.planet-service.fr -- port:587 -- socket:0x600000ab43a0 -- thread:0x6080032654c0
STARTTLS
WROTE Oct 18 23:33:53.364 [kCFStreamSocketSecurityLevelNone] -- host:smtp.planet-service.fr -- port:587 -- socket:0x6000014a58e0 -- thread:0x600001e6fbc0
STARTTLS
READ Oct 18 23:33:53.432 [kCFStreamSocketSecurityLevelNone] -- host:smtp.planet-service.fr -- port:587 -- socket:0x600000ab43a0 -- thread:0x6080032654c0
220 ready for tls
READ Oct 18 23:33:53.432 [kCFStreamSocketSecurityLevelNone] -- host:smtp.planet-service.fr -- port:587 -- socket:0x6080010b1400 -- thread:0x600003479b00
220 ready for tls
READ Oct 18 23:33:53.433 [kCFStreamSocketSecurityLevelNone] -- host:smtp.planet-service.fr -- port:587 -- socket:0x6000014a58e0 -- thread:0x600001e6fbc0
220 ready for tls
WROTE Oct 18 23:33:53.642 [kCFStreamSocketSecurityLevelTLSv1_0] -- host:smtp.planet-service.fr -- port:587 -- socket:0x600000ab43a0 -- thread:0x6080032654c0
EHLO [10.0.0.108]
READ Oct 18 23:33:53.698 [kCFStreamSocketSecurityLevelTLSv1_0] -- host:smtp.planet-service.fr -- port:587 -- socket:0x600000ab43a0 -- thread:0x6080032654c0
250-smtp.planet-service.fr
250-AUTH LOGIN CRAM-MD5 PLAIN
250-AUTH=LOGIN CRAM-MD5 PLAIN
250-PIPELINING
250 8BITMIME
WROTE Oct 18 23:33:53.699 [kCFStreamSocketSecurityLevelTLSv1_0] -- host:smtp.planet-service.fr -- port:587 -- socket:0x600000ab43a0 -- thread:0x6080032654c0
QUIT
WROTE Oct 18 23:33:53.777 [kCFStreamSocketSecurityLevelTLSv1_0] -- host:smtp.planet-service.fr -- port:587 -- socket:0x6000014a58e0 -- thread:0x600001e6fbc0
EHLO [10.0.0.108]
WROTE Oct 18 23:33:53.778 [kCFStreamSocketSecurityLevelTLSv1_0] -- host:smtp.planet-service.fr -- port:587 -- socket:0x6080010b1400 -- thread:0x600003479b00
EHLO [10.0.0.108]
READ Oct 18 23:33:53.838 [kCFStreamSocketSecurityLevelTLSv1_0] -- host:smtp.planet-service.fr -- port:587 -- socket:0x6000014a58e0 -- thread:0x600001e6fbc0
250-smtp.planet-service.fr
250-AUTH LOGIN CRAM-MD5 PLAIN
250-AUTH=LOGIN CRAM-MD5 PLAIN
250-PIPELINING
250 8BITMIME
WROTE Oct 18 23:33:53.838 [kCFStreamSocketSecurityLevelTLSv1_0] -- host:smtp.planet-service.fr -- port:587 -- socket:0x6000014a58e0 -- thread:0x600001e6fbc0
QUIT
READ Oct 18 23:33:53.842 [kCFStreamSocketSecurityLevelTLSv1_0] -- host:smtp.planet-service.fr -- port:587 -- socket:0x6080010b1400 -- thread:0x600003479b00
250-smtp.planet-service.fr
250-AUTH LOGIN CRAM-MD5 PLAIN
250-AUTH=LOGIN CRAM-MD5 PLAIN
250-PIPELINING
250 8BITMIME
WROTE Oct 18 23:33:53.843 [kCFStreamSocketSecurityLevelTLSv1_0] -- host:smtp.planet-service.fr -- port:587 -- socket:0x6080010b1400 -- thread:0x600003479b00
QUIT -
Installed Ziggo e-mail on i-phone 4j ust like their website tells you to do. Mails come in but it is not possible to send mails. The i-phone tells me the server doesn't recognise the forwarding e-mail adres.
Ziggo helpdesk tell me this is not their problem but the problem of Apple.
Please help.
Jooplike stated here only you can just focus on verifying that your smtp settings are correct
https://discussions.apple.com/thread/3925779?tstart=0 -
I am new to Mac and i managed to install and configure all the services. Now my issue is when i sending mail using the local server to internal, mails are not receiving. Mail queue showing Connection refused error. Please help me
Thanks
GIRITry this -> http://support.apple.com/kb/TA38632?viewlocale=en_US
-
I installed IOS7 after first backing up my ipad2 and now I can't send mail : my outgoing mail servers won't work, and I lost several Apps, unfortunately I did not have a list nor can I remember what they were.
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/
Setting up and troubleshooting Mail
http://www.apple.com/support/ipad/assistant/mail/
Using a POP account with multiple devices
http://support.apple.com/kb/ht3228
iOS: Adding an email account
http://support.apple.com/kb/HT4810
iOS: Setting up an Outlook.com, Hotmail, Live, or MSN email account
http://support.apple.com/kb/ht1694
Server does not allow relaying email error, fix
http://appletoolbox.com/2012/01/server-does-not-allow-relaying-email-error-fix/
Why Does My iPad Say "Cannot Connect to Server"?
http://www.ehow.co.uk/info_8693415_ipad-say-cannot-connect-server.html
How to Sync Contacts with Your iPad Using iTunes
http://www.dummies.com/how-to/content/how-to-sync-contacts-with-your-ipad-using- itunes.html
iOS: 'Mailbox Locked', account is in use on another device, or prompt to re-enter POP3 password
http://support.apple.com/kb/ts2621
eMail Groups - You can use a third party app that many users recommend.
MailShot - https://itunes.apple.com/us/app/mailshot-pro-group-email-done/id445996226?mt=8
Group Email - https://itunes.apple.com/us/app/group-email!-mail-client-attachments/id380690305 ?mt=8
iPad Mail
http://www.apple.com/support/ipad/mail/
Configuration problems with IMAP e-mail on iOS with a non-standard SSL port.
http://colinrobbins.me/2013/02/09/configuration-problems-with-imap-e-mail-on-ios -with-a-non-standard-ssl-port/
Try this first - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
Or this - Delete the account in Mail and then set it up again. Settings->Mail, Contacts, Calendars -> Accounts Tap on the Account, then on the red button that says Remove Account.
Cheers, Tom -
Send mail from SAP system to another SAP system
Hello Xperts
I need to send a mail from one SAP box (ECC) to another SAP box (SRM,CRM, EP etc). I know how to send mail from SAP to external address but unable to find the parameters in this case. Kindly help.
thkx
Prabhu
PS: Kindly DONOT post on "How to send mail from SAP" as my questions is all abt how to send mail from one sap system to another sap systemHi
To send mail Internally check this sample code it works fine this code was developed by me
*& Report ZMATURITYREPORT *
*& Title - Maturity report *
*& ABAP/4 Consultant *
*& Name- Pavan Praveen Valluri Created on 26/07/2007 *
*& Module - FI *
REPORT ZMATURITYREPORT.
tables: bseg.
* SELECTION SCREEN--------------------------------------------------- *
parameters: p_email type somlreci1-receiver default
'@gujaratpetro.com'.
* Data: p_email(25) type c value '[email protected]'.
* END OF SELECTION SCREEN ------------------------------------------- *
*----------DATA DECLARATION--------------------------------------------*
data: it_message type standard table of solisti1 initial size 0
with header line.
data: it_message1 type standard table of solisti1 initial size 0
with header line.
data: it_message2(10) type N.
data: it_message3 type standard table of solisti1 initial size 0
with header line.
data: it_message4 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: text(150).
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.
data: lv_date type sy-datum.
data: lv_date1 type sy-datum.
data: lv_formatdate(10) type c.
data: lv_formatdate1(10) type c.
data: var1(4) type c,
var2(2) type c,
var3(2) type c.
data: begin of int_bseg occurs 0,
BELNR LIKE BSEG-BELNR,
ZUONR LIKE BSEG-ZUONR,
GJAHR LIKE BSEG-GJAHR,
DMBTR LIKE BSEG-DMBTR,
HKONT LIKE BSEG-HKONT,
end of int_bseg.
data: begin of int_SKAT occurs 0,
TXT50 LIKE SKAT-TXT50,
SAKNR LIKE SKAT-SAKNR,
KTOPL LIKE SKAT-KTOPL,
end of int_SKAT.
data: begin of int_bkpf occurs 0,
BELNR LIKE BKPF-BELNR,
BUKRS LIKE BKPF-BUKRS,
GJAHR LIKE BKPF-GJAHR,
BUDAT LIKE BKPF-BUDAT,
end of int_BKPF.
data: 2days_out type sy-datum.
2days_out = sy-datum + 2.
data: var4(4) type c,
var5(2) type c,
var6(2) type c.
*-------- END OF DATA DECLARATION--------------------------------------*
*--- CONCATENATING AND ARRANGING DATE ---------------------------------*
lv_date = 2days_out.
var1 = lv_date+(4).
var2 = lv_date+4(2).
var3 = lv_date+6(2).
concatenate var3 var2 var1 into lv_formatdate separated by '.'.
*--- END OF CONCATENATING AND ARRANGING DATE -------------------------*
*-------------------------SELECTION FOR BSEG---------------------------*
select zuonr belnr bukrs GJAHR DMBTR HKONT from bseg into
corresponding fields of table int_bseg
where bukrs = 'company name' and
ZUONR = lv_formatdate.
*--------------END OF SSELECTION FOR BSEG--------------------------- *
*-------------------------SELECTION FOR BKPF---------------------------*
select BUDAT BUKRS BELNR GJAHR from BKPF into
corresponding fields of table int_BKPF
where bukrs = 'company name'.
append int_BKPF.
*------------------END OF SELECTION FOR BKPF---------------------------*
*-------------------------SELECTION FOR SKAT---------------------------*
select SAKNR TXT50 from SKAT into
corresponding fields of table int_SKAT
where KTOPL = 'company name'.
*and SAKNR = INT_BSEG-HKONT.
APPEND INT_SKAT.
*--------------END OF SSELECTION FOR SKAT--------------------------- *
*-----------------POPULATING EMAIL SUBJECT ----------------------------*
perform populate_email_message_body.
perform send_file_as_email_attachment
tables it_message
it_attach
using p_email
'Maturity after 2 days'
'XLS'
'filename'
changing gd_error
gd_reciever.
* Instructs mail send program for SAPCONNECT to send email(rsconn01)
perform initiate_mail_execute_program.
*endif.
end-of-selection.
*------------END OF POPULATING EMAIL SUBJECT --------------------------*
*& 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.
* 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
object_header = t_object_header
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. "send_file_as_email_attachment
*& 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
*& Form POPULATE_EMAIL_MESSAGE_BODY
* Populate message body text
form populate_email_message_body.
refresh it_message.
refresh it_message1.
refresh it_message3.
refresh it_message4.
*--------------- LOOP FOR BSEG -----------------------------------------
loop at int_BSEG.
read table int_bKPF WITH KEY BELNR = INT_BSEG-BELNR
GJAHR = INT_BSEG-GJAHR.
read table int_SKAT WITH KEY SAKNR = INT_BSEG-HKONT.
*---CHANGING DATE FORMAT FOR BKPF---------------------------------------
lv_date1 = int_bkpf-budat.
var4 = lv_date1+(4).
var5 = lv_date1+4(2).
var6 = lv_date1+6(2).
concatenate var6 var5 var4 into lv_formatdate1 separated by '.'.
*---END OF CHANGING DATE FORMAT FOR BKPF-------------------------
it_message = int_bseg-belnr.
it_message1 = lv_formatdate1.
it_message2 = int_bseg-dmbtr.
it_message3 = int_bseg-hkont.
IT_MESSAGE4 = INT_SKAT-TXT50.
SHIFT IT_MESSAGE2 LEFT DELETING LEADING '0'.
*-------------POPULATING EMAIL BODY WITH DATA -------------------------
concatenate 'Maturity After 2Days' 'for' 'G/L account-' it_message3
'--' IT_MESSAGE4 ',' 'Amount-' it_message2
into it_message separated by space.
append it_message.
append it_message1.
append it_message3.
clear it_message.
clear it_message1.
clear it_message2.
clear it_message3.
endloop.
*------------END OF LOOP FOR BSEG --------------------------------------
endform. " POPULATE_EMAIL_MESSAGE_BODY
<b><i>
To send an mail with external attachment check this one
</b></i>
<i>first create a Include report with the following coding</i>
*& Include ZPA1_INCLFOR_MAIL *
* Data
DATA: docdata LIKE sodocchgi1,
objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objhex LIKE solix OCCURS 10 WITH HEADER LINE,
reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
DATA: tab_lines TYPE i,
doc_size TYPE i,
att_type LIKE soodk-objtp.
DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
* FORM
FORM ml_customize USING objname objdesc.
*----------- Clear Variables
CLEAR docdata.
REFRESH objpack.
CLEAR objpack.
REFRESH objhead.
REFRESH objtxt.
CLEAR objtxt.
REFRESH objbin.
CLEAR objbin.
REFRESH objhex.
CLEAR objhex.
REFRESH reclist.
CLEAR reclist.
REFRESH listobject.
CLEAR listobject.
CLEAR tab_lines.
CLEAR doc_size.
CLEAR att_type.
*--------- Set Variables
docdata-obj_name = objname.
docdata-obj_descr = objdesc.
ENDFORM. "ml_customize
* FORM
FORM ml_addrecp USING preceiver prec_type.
CLEAR reclist.
reclist-receiver = preceiver.
reclist-rec_type = prec_type.
APPEND reclist.
ENDFORM. "ml_customize
* FORM
FORM ml_addtxt USING ptxt.
CLEAR objtxt.
objtxt = ptxt.
APPEND objtxt.
ENDFORM. "ml_customize
* FORM
FORM ml_prepare USING bypassmemory whatatt_type whatname.
IF bypassmemory = ''.
*--------- Fetch List From Memory
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'LIST_FROM_MEMORY'.
ENDIF.
CALL FUNCTION 'TABLE_COMPRESS'
* IMPORTING
* COMPRESSED_SIZE =
TABLES
in = listobject
out = objbin
EXCEPTIONS
OTHERS = 1
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'TABLE_COMPRESS'.
ENDIF.
ENDIF.
* Header Data
* Already Done Thru FM
* Main Text
* Already Done Thru FM
* Packing Info For Text Data
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'TXT'.
APPEND objpack.
* Packing Info Attachment
att_type = whatatt_type..
DESCRIBE TABLE objbin LINES tab_lines.
READ TABLE objbin INDEX tab_lines.
objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = att_type.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = whatname.
APPEND objpack.
* Receiver List
* Already done thru fm
ENDFORM. "ml_prepare
* FORM
FORM ml_dosend.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = docdata
put_in_outbox = 'X'
commit_work = 'X' "used from rel. 6.10
* IMPORTING
* SENT_TO_ALL =
* NEW_OBJECT_ID =
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
* CONTENTS_HEX = objhex
* OBJECT_PARA =
* object_parb =
receivers = reclist
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 'SO' TYPE 'S' NUMBER '023'
WITH docdata-obj_name.
ENDIF.
ENDFORM. "ml_customize
* FORM
FORM ml_spooltopdf USING whatspoolid.
DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
*-------------- Call Function
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = whatspoolid
TABLES
pdf = pdf
EXCEPTIONS
err_no_otf_spooljob = 1
OTHERS = 12.
*------------- Convert
PERFORM doconv TABLES pdf objbin.
ENDFORM. "ml_spooltopdf
* FORM
FORM doconv TABLES
mypdf STRUCTURE tline
outbin STRUCTURE solisti1.
*-------- Data
DATA : pos TYPE i.
DATA : len TYPE i.
*------------ Loop And Put Data
LOOP AT mypdf.
pos = 255 - len.
IF pos > 134. "length of pdf_table
pos = 134.
ENDIF.
outbin+len = mypdf(pos).
len = len + pos.
IF len = 255. "length of out (contents_bin)
APPEND outbin.
CLEAR: outbin, len.
IF pos < 134.
outbin = mypdf+pos.
len = 134 - pos.
ENDIF.
ENDIF.
ENDLOOP.
IF len > 0.
APPEND outbin.
ENDIF.
ENDFORM. "doconv
<b>
Then include that report in the following report and copy the same code and paste it there
</b>
*& Report ZPA_TEMP147 *
REPORT ZPA_TEMP147 .
INCLUDE zpa1_inclfor_mail.
* DATA
DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA : file_name TYPE string.
data : path like PCFILE-PATH.
data : extension(5) type c.
data : name(100) type c.
* SELECTION SCREEN
PARAMETERS : receiver TYPE somlreci1-receiver lower case.
PARAMETERS : p_file LIKE rlgrap-filename
OBLIGATORY.
* AT SELECTION SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CLEAR p_file.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
file_name = p_file.
* START-OF-SELECTION
START-OF-SELECTION.
PERFORM ml_customize USING 'Tst' 'Testing'.
PERFORM ml_addrecp USING receiver 'U'.
PERFORM upl.
PERFORM doconv TABLES itab objbin.
PERFORM ml_prepare USING 'X' extension name.
PERFORM ml_dosend.
SUBMIT rsconn01
WITH mode EQ 'INT'
AND RETURN.
* FORM
FORM upl.
file_name = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = file_name
filetype = 'BIN'
TABLES
data_tab = itab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
path = file_name.
CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
EXPORTING
complete_filename = path
* CHECK_DOS_FORMAT =
IMPORTING
* DRIVE =
EXTENSION = extension
NAME = name
* NAME_WITH_EXT =
* PATH =
EXCEPTIONS
INVALID_DRIVE = 1
INVALID_EXTENSION = 2
INVALID_NAME = 3
INVALID_PATH = 4
OTHERS = 5
ENDFORM. "upl
<b>These are the FM for sending external email :-</b>
SO_DOCUMENT_SEND_API1
SAPoffice: Send new document with attachments via RFC
SO_NEW_DOCUMENT_ATT_SEND_API1
(In 4.6C only, You can go to SE37 and click the documentation on how to use it. A sample program is provided there.)
SAPoffice: Send new document with attachments via RFC
Note : If you are using FM SO_NEW_DOCUMENT_ATT_SEND_API1 then Export Parameter DOCUMENT_DATA-OBJ_DESCR contains the Subject.
SO_NEW_DOCUMENT_SEND_API1
SAPoffice: Send new document
<b>Check this sample report</b>
DATA : BEGIN OF ITAB OCCURS 0,
PERNR LIKE PA0001-PERNR,
ENAME LIKE PA0001-ENAME,
END OF ITAB.
DATA: message_content LIKE soli OCCURS 10 WITH HEADER LINE,
receiver_list LIKE soos1 OCCURS 5 WITH HEADER LINE,
packing_list LIKE soxpl OCCURS 2 WITH HEADER LINE,
listobject LIKE abaplist OCCURS 10,
compressed_attachment LIKE soli OCCURS 100 WITH HEADER LINE,
w_object_hd_change LIKE sood1,
compressed_size LIKE sy-index.
START-OF-SELECTION.
SELECT PERNR ENAME
INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM PA0001
WHERE PERNR < 50.
LOOP AT ITAB.
WRITE :/02 SY-VLINE , ITAB-PERNR, 15 SY-VLINE , ITAB-ENAME, 50
SY-VLINE.
ENDLOOP.
* Receivers
receiver_list-recextnam = '[email protected]'. "-->
* EMAIL ADDRESS
RECEIVER_list-RECESC = 'E'. "<-
RECEIVER_list-SNDART = 'INT'."<-
RECEIVER_list-SNDPRI = '1'."<-
APPEND receiver_list.
* General data
w_object_hd_change-objla = sy-langu.
w_object_hd_change-objnam = 'Object name'.
w_object_hd_change-objsns = 'P'.
* Mail subject
w_object_hd_change-objdes = 'Message subject'.
* Mail body
APPEND 'Message content' TO message_content.
* Attachment
CALL FUNCTION 'SAVE_LIST'
EXPORTING
list_index = '0'
TABLES
listobject = listobject.
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
compressed_size = compressed_size
TABLES
in = listobject
out = compressed_attachment.
DESCRIBE TABLE compressed_attachment.
CLEAR packing_list.
packing_list-transf_bin = 'X'.
packing_list-head_start = 0.
packing_list-head_num = 0.
packing_list-body_start = 1.
packing_list-body_num = sy-tfill.
packing_list-objtp = 'ALI'.
packing_list-objnam = 'Object name'.
packing_list-objdes = 'Attachment description'.
packing_list-objlen = compressed_size.
APPEND packing_list.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
object_hd_change = w_object_hd_change
object_type = 'RAW'
owner = sy-uname
TABLES
objcont = message_content
receivers = receiver_list
packing_list = packing_list
att_cont = compressed_attachment.
<b>Settings for sending mail</b>
Configuring SAP 4.6x Internet mail Gateway
SAP can be configured to send and receive emails from different sources.This section explains how to integrate SAPOffice with an external emailsystem. Your Internet email must be configured and running prior to this.Email from SAP is forwarded to the users external email system..
You can configure inbound and outbound forwarding. Outbound flow forwardsa SAP message (eg: update termination) via UNIX sendmail to the intended recepient. Inbound accepts a message from sendmail and places it in the users SAPOffice inbox. Many companies prefer to configure outbound only.
Configuring outbound forwarding
SAP configuration
1. Create your RFC destination for outbound email using transaction SM59
RFC Destination : SAP_INTERNET_GATEWAY
Connection Type : T
Description : SAP internet mail gateway
Click on 'Explicit Host' if you wanton demand gateway dameon invocation.
Program : /sapmnt/SID/exe/mlunxsnd
Target Host : Enter hostname that runs your central instance.
Click 'Test Connection' and you should seea successfull message.
2. Shared Office Settings transaction SO16-> Send -> Settings or
directly via transaction SCOT- SAPconnect Administation
Nodes - Create
Node : IMAIL
Description : SAP internet mail gateway
RFC Destination : SAP_INTERNET_GATEWAY
Tick : Internet
Address Area : *
Tick : All formats
Dev. type : Choose an approciate Printer Device
Set further addresstype : N
Maximum waiting timefor repeat send attempt procedure : Blank or decide for yourself
Tick : Node is ready for use
Setting
- DefaultDomain : <your company domain>.com
- Conversionrule : require if your communication device only support one format.
e.g. if you email system only support the format RAW (ASCII text format)
Format To Format Ranking Function module
ALI RAW 1 SX_OBJECT_CONVERT_ALI_RAW (convert APAP List)
Referto note 171698 - SAPconnect: Formats, conversion, device type
UNIX configuration
1 .. cd /sapmnt/SID/exe
2 ..csh
..mlsomadm mailgw.ini
System Name [C11] :
Client [000] :
Username : MAILADM
Password : MAILADM
Language : E
Load Balancing :
Hostname : <hostname>
System number : <instance_number>
Gateway hostname: <central_instance_hostname>
Gateway Service : <instance number>
Use SAP Router :
Trace level :
Sendmail Command [/usr/lib/sendmail -i -f<SENDER_ADDRESS>]:
Codepage [ISO-8859-1] :
Trace Level (Outbound) [0] :
Update file sapmailsid.cfg? [Y]
Testing whether your configuration is successful
1. Logon to SAP
2. Execute transaction SO01
3. Write a message and send it to <your_internet_email_address>
4. If you don't see the mail in your internet mailbox, go back and review steps 1-12
Schedule the SAP Internet Mail Gateway Jobs to start every 5 minutes
1. Create
2. Position your cursor at INT
3. Click Schedule and supply the date and time
4. Click Schedule periodically and tick Minutes and type in 5
5. Click Create and you are done
6. Click Show Scheduling to check
Problems that you might encounter :-
If you have set up a node in SCOT and it tests out well but recieve the reply.
"Cannot process message in node, parameterscannot be converted".
Make sure the RFC connection is working, and that SapConnect has been installed on the Unix Server or the Microsoft Exchange Server. Originally, I had the same error, and found that nothing had been installed on Unixor Exchange, to support SapConnect.
In SCOT (View -> System Status), your mail remains at the Intransit column.
Check you sendmail.cf files (e.g.Sun Solaris /etc/mail/sendmail.cf). Try using the sendmail command to send a test file at the Unix level. You must be able to send mail at theUnix level before you can send mail at the SAP level.
http://help.sap.com/saphelp_nw04/helpdata/en/cf/700b405bacdd5fe10000000a155106/content.htm
http://www.tamboly.com/SAPEmailConfiguration.html
Check my previous links
Mail Send
sending mails from abap program
Mail Sending to external email id's
settings needed for sending emails
Regards
Pavan
Maybe you are looking for
-
Support for Physical Inventories in Open Stores
Hello, I using Retail system and POS DM. (for our business the store open 24/7) I have question about physical inventory process: One step: I create Physical inventory document in R/3, Two step : counting in store and enter counting in R/3 Three ste
-
Error message - please help! "This copy of iTunes will expire in 113 hours"
Hello, I opened up iTunes today and received this popup which said "This copy of iTunes will expire in 113 hours". I have never seen anything like this and have no idea why. I only ever use iTunes on my one laptop. I use Leopard and have iTunes versi
-
Authorize Acrobat XI Pro in Creative Cloud...
In some mad way every app you download in creative cloud works but Acrobat XI Pro, I download the trial and try every single day to authorize it and when the trial runs out it stops working and only asks for a serial number... If I try the trial or
-
Material Frieght Group_Plz Help
Hi Gurus, Plz tell, What is material Frieght Group? Plz explain along with the procedure to run the complete functionality. Any Help please........ Thanks AKSHAY Edited by: akshay sonurkar on Jul 26, 2008 9:58 AM
-
Images should grow or shrink when the user chooses a larger or smaller font size in ADE.
Hi All, I use percentage values (in "width" attribute within "img" element) for image that should grow or shrink when the user chooses a larger or smaller font size. The adjustment affects not only the size of the text but also images but the images