|
#1
|
|||
|
|||
|
Sending an email with the AS400
Hello,
i am a newbie and i wish to know how to send a simple email. I type the commande SNDDST but it seems complexe to me ; i want simply send a text message to a client or someone else. Thanks in advance for help. Wolf |
|
#2
|
||||
|
||||
|
Here is a simple cheatsheet that I created a long time ago. I think it is still applicable. Copy/paste the text into your word processor and it will be easier to read.
Code:
How to send email from iSeries I. Simple message You will need to know the internet address(es) of the recipient(s). Use the SNDDST command to send the message. Parameters: 1. TYPE: Use *LMSG (Long Message, 5000 characters maximum) 2. TOINTNET: The internet address of the recipient. Use the “+” for additional addresses. Recipient Type is *PRI for the TO addressee *CC for CC: addressees *BCC for BCC: addressees. 3. DSTD: This field contains the subject line of your message 4. LONGMSG: The text of your message. Example: SNDDST TYPE(*LMSG) TOINTNET((someone@SomeDomain.com) (someoneelse@hotmail.com *PRI)) DSTD(Here is your file!!) LONGMSG(Your test worked great!. Please call me if you have questions/comments. ) II. Send a file as an attachment The file must exist in the QDLS directory structure. You need to know the name of the file. You will need to know the internet address(es) of the recipient(s). Use the SNDDST command to send the message. Parameters: 1. TYPE: Use *DOC (The document specified on the Document prompt (DOC parameter) or the Document identifier prompt (DOCID parameter) is sent. The user must have authority for the document before it can be sent). 2. TOINTNET: The internet address of the recipient. Use the “+” for additional addresses. Recipient Type is *PRI for the TO addressee *CC for CC: addressees *BCC for BCC: addressees. 3. DSTD: This field contains the subject line of your message 4. MSG: The text of your message (256 characters maximum). 5. SNDFMT: *NOCHG 6. DOC: The name of the document in 8.3 format, e.g., TESTMAIL.TXT, or whatever name exists in the QDLS folder. 7. FLR: The name of the folder in the QDLS directory, e.g., PCUPLOAD Example: SNDDST TYPE(*DOC) TOINTNET((someone@SomeDomain.com *PRI) (someoneelse@hotmail.com *PRI)) DSTD(Here is your file!!) MSG(File TESTMAIL.txt attached) SNDFMT(*NOCHG) DOC(TESTMAIL.TXT) FLR(PCUPLOAD) HTH, Robert
__________________
"Contrariwise, if it was so, it might be; and if it were so, it would be; but as it isn't, it ain't. That's logic.''--Tweedledee
Last edited by zreclay; 03-21-2006 at 09:47 AM. |
|
#3
|
|||
|
|||
|
sending an email with AS400
Thanks for your response but i have another problem ; when i execute the command , the system tell me that the user doesn't exist in the mailing list ; but i don't want to send a mail to a specific user but i want to send a mail to a friend or to a relative for example.
Is it a way to create a mailing list in AS400 , if yes , can you tell me how to do this ? Thanks Wolf |
|
#4
|
||||
|
||||
|
Sounds like you may need to have your system administrator configure the machine to allow for outside email. Someone else with have to chime in with advice for that. Sorry.
As far as the mailing list is concerned, IBM has a free utility called MMAIL that is great for just that purpose. Check out http://www-922.ibm.com/mmail/start. Your system administrator will have to help with the install if you decide it will work for you. Robert
__________________
"Contrariwise, if it was so, it might be; and if it were so, it would be; but as it isn't, it ain't. That's logic.''--Tweedledee
|
|
#5
|
|||
|
|||
|
sending mail with the AS400
I'am working with an AS400 who's dedicated to test : i can do what i want with it ; i have all rights (allobj , qsecoff ).
I'm not the administrator but i've got the same rights. Is it complicate to configure the machine to allow outside mail ? If no , can you tell me how to do this if it's not too long ? Thanks Wolf , an AS400 newbie |
|
#6
|
||||
|
||||
|
First of all, you have to understand that the AS/400 supported E-mail long before the Internet came around, and SMTP became popular. It used an e-mail system called SNADS that IBM developed specifically for their business machines.
That's why commands like SNDDST seem so complicated. They weren't designed for today's Internet e-mail, they were designed for SNADS and later adapted for SMTP. Before explaining how to set up e-mail, I'm making the following assumptions:
The first thing you'll want to do is configure your iSeries SMTP server. This is used when sending mail as well as receiving it. Type the following command: Code:
CHGSMTPA AUTOSTART(*YES) MAILROUTER('your.isp.smtp.server') FIREWALL(*YES) ALWRLY(*BOTH)
You'll also want to make sure that e-mail messages are not split up, even if they're big. This has always seemed strange to me, but it's controlled by the CHGPOPA (Change POP3 Attributes) command. Code:
CHGPOPA MSGSPLIT(*NOMAX) Code:
ADDSMTPLE TYPE(*ACCEPT) INTNETADR('192.168.5.0') SUBNETMASK('255.255.255.0')
The next thing you'll need to do is set up a gateway that allows SNADS tools like SNDDST to send Internet e-mail. To do that, type the following commands: Code:
ADDDIRE USRID(INTERNET GATEWAY) + USRD(‘Internet SMTP gateway’) SYSNAME(INTERNET) + PREFADR(NETUSRID *IBM ATCONTXT) CHGDSTA SMTPRTE(INTERNET GATEWAY) Now that SMTP is configured on your system, so go ahead and start the SMTP server Code:
STRTCPSVR SERVER(*SMTP) Each user who needs to send e-mail using SNDDST will need to have a directory entry and SMTP e-mail address configured on the iSeries. Code:
ADDDIRE USRID(KLEMSCOT S10262BA) USRD('Scott Klement')
Code:
WRKNAMSMTP TBLTYPE(*SYSTEM)
Once all of that is done, it should be easy to send off a test e-mail with SNDDST. For example: Code:
SNDDST TYPE(*LMSG) +
TOINTNET(('unclebob@example.com')) +
DSTD('Put E-mail Subject Here') +
LONGMSG('Hi Bob. This is an E-mail message sent from my iSeries system.')
There are also lots of free e-mail tools on the Web that can use this SMTP server. They provide many more capabilities than SNDDST does. But, alas, this message is getting too long, so I'll stop there. Last edited by Scott Klement; 07-26-2006 at 01:49 AM. |
|
#7
|
|||
|
|||
|
email s from AS400
I can send emails using SNDDST command .. But I can send only to my local domains only.. I cannot send it to yahoo.com or hotmail.com like emails. But if I use same system as the mail client which is lotus notes I can send emails to those ids.. To enable to send other than local domain are there any settings to be done in the system?
Last edited by swelabada; 09-20-2006 at 08:47 AM. |
|
#8
|
||||
|
||||
|
There are many different things that can prevent e-mail from working. What happens when you try to send to other domains? Do you get an error message? Do you get a bounce?
Understanding what part of the process is failing will help us lead you in the right direction. |
|
#9
|
|||
|
|||
|
Email fro As400
Done.. My System administrator has blocked the lotus notes server to outside emails.. He gave me a differerent IP for out going mails .. Thank for your prompt support..
|
|
#10
|
|||
|
|||
|
AS400 emails
I have well configured the email sneds from as400. and It was working really well. But all of a sudden email sending was stoped. Nothing has been change and Still the SNDDST command says "Send distribution completed successfully".
I tried the same in the test as400 which is in the same LAN and its working perfectly. means no problum with the Lotus mail server. Can you please guide me to where to check this ? I even stop and start the SMTP server and still the problum is there. I checked in "WRKDSTQ" and there are no pending entries in the QUEUE. Status is like MESADEV Normal : - : : 1 0 Not-Rdy Where as Not-Rdy mode is common to test box which is working.. Pls guide.. Last edited by swelabada; 10-08-2006 at 09:03 AM. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|