ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

SNDDST vs sender address (when email is received at destination)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SNDDST vs sender address (when email is received at destination)

    I am having a SNDDST problem where the sender address is causing the email to be rejected since it is not valid. Is there a way to drop the system name from the sender email address? Instead of the sender email being user@company.com it is user@as400.company.com.

  • #2
    Re: SNDDST vs sender address (when email is received at destination)

    yes just add the correct address there...

    WRKDIRE

    then fine userid "2" to edit and F19=Change name for SMTP
    change these
    SMTP user ID
    SMTP domain
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Re: SNDDST vs sender address (when email is received at destination)

      Thanks jamief for your quick reply. Sorry for my late reply, I was out for Chrismas holidays.

      Correct me if I am wrong but the "Change name for SMTP" window is to create an SMTP alias to a WRKDIRE entry, so we can send an external email to that user. Am i right ?

      Then, when our AS400 sends an email to that SMTP address (ie: MyEmailAddress@MyCompany.com), the email that I receive in my email client software seems to come from MyAs400User@As400SystemName.MyCompany.com

      Our Anti-spam server is rejecting the incoming email because it says that the sender (MyAs400User@As400SystemName.MyCompany.com) is not valid. It should be MyAs400User@MyCompany.com

      Is there a way to drop the system name when the AS400 sends en email to an external user ?

      Thanks

      Comment


      • #4
        Re: SNDDST vs sender address (when email is received at destination)

        Use command CHGTCPDMN to set :
        • HOSTNAME to your system name
        • DMNNAME to your company.xxx domain name


        But why are you still using this antique SNDDST ?
        Mais pourquoi continuer à utiliser cet antique SNDDST ?
        Philippe

        Comment


        • #5
          Re: SNDDST vs sender address (when email is received at destination)

          Hi Mercury,

          Thanks for the reply. If you don't mind, we will continue in english to make sure we reach more people. The more people we reach, better are my chances to have this issue resolved. Thanks for your understanding.

          The hostname and the domain name are set in the CHGTCPDMN.

          My hostname is SODAS002 and my domain name is MyCompany.com

          The problem is that when I send an email to my attention, When I receive it, it comes from
          MyAs400UserProfile@Sodas002.MyCompany.com

          How can I get rid of the Sodas002 in the sender address so it comes from MyAs400UserProfile@MyCompany.com

          Thanks

          About the Antique SNDDST command, I am not aware of another command to achieve it. Can you tell me what is the command that could let me send an email to an external smtp server so it is relayed to any external email address ?

          For your information, We are running AS400 V5R4M5

          Thanks

          Comment


          • #6
            Re: SNDDST vs sender address (when email is received at destination)

            Yes change here
            (see image)
            Attached Files
            All my answers were extracted from the "Big Dummy's Guide to the As400"
            and I take no responsibility for any of them.

            www.code400.com

            Comment


            • #7
              Re: SNDDST vs sender address (when email is received at destination)

              Originally posted by jamief View Post
              Yes change here
              (see image)
              Hi jamief,

              The image you sent me is the "Change Name for SMTP" for the user FLANARY in the WRKDIRE. Again, correct me if I am wrong but this SMTP alias is necessary if you want to use SNDDST to send an email to user FLANARY right ? Or there is something I don't understand here. Thanks to clarify.

              Again, I may be wrong but here is what I am trying.

              I created a directory called TYPEROON EMAIL in wich I did the F19 (change name for SMTP) to specify the email address of the "user".

              SMTP user ID: typeroon
              SMTP domain: MyCompany.com

              Then, I use the followin command;

              SNDDST TYPE(*LMSG) TOUSRID((TYPEROON EMAIL)) DSTD('subject') MSG('message 1') LONGMSG('message 2')

              Please note that my AS400 is not my SMTP server so I did the CHGSMTPA to set the mail router to my real SMTP server. (I don't know if it may be the problem but....)

              Few seconds later, I receive the email from my as400 but the email comes from EPERRON@SODAS002.MYCOMPANY.COM

              EPERRON = The user with wich I was logged when I issed the SNDDST command on the AS400 (that is ok)
              SODAS002 = My AS400 hostname in the CHGTCPDMN (I don't want the as400 to insert the hostname in the sender address)
              MYCOMPANY.COM = The domain name that is configured in the CHGTCPDMN (that is ok)

              If you send yourself an email from your As400, what is the sender name that you see in the email ?

              Thanks to tell me if I am missing something or if there is something I do not understand correctly. I may not use the "email feature" of the AS400 properly.

              Thanks.

              Comment


              • #8
                Re: SNDDST vs sender address (when email is received at destination)

                The directory entry is left over from the old office (STROFC) days...
                it is also required to do stuff with QDLS ,but not IFS (I think)

                So you can have a directory entry without hitting F19 to add the email information.
                in this situation you can use the snddst and when the email is received the email address will include the system.

                jamie
                All my answers were extracted from the "Big Dummy's Guide to the As400"
                and I take no responsibility for any of them.

                www.code400.com

                Comment


                • #9
                  Re: SNDDST vs sender address (when email is received at destination)

                  just 4 fun i changed my address to michellerodriguez@OMG.com see image for received email.

                  Now this sending thru the systemi.
                  PHP Code:
                  SNDDST TYPE(*LMSGTOINTNET((jamie@code400.com))   
                  DSTD('This is a test of snddst')                   
                  MSG('This is the message section')                 
                  LONGMSG('this is the long message'



                  jamie
                  Attached Files
                  All my answers were extracted from the "Big Dummy's Guide to the As400"
                  and I take no responsibility for any of them.

                  www.code400.com

                  Comment


                  • #10
                    Re: SNDDST vs sender address (when email is received at destination)

                    Originally posted by typeroon
                    Thanks for the reply. If you don't mind, we will continue in english to make sure we reach more people. The more people we reach, better are my chances to have this issue resolved. Thanks for your understanding.

                    The hostname and the domain name are set in the CHGTCPDMN.

                    My hostname is SODAS002 and my domain name is MyCompany.com

                    The problem is that when I send an email to my attention, When I receive it, it comes from
                    MyAs400UserProfile@Sodas002.MyCompany.com

                    How can I get rid of the Sodas002 in the sender address so it comes from MyAs400UserProfile@MyCompany.com
                    OK. Off the top of my head as I've done it only once or twice , enter command CFGTCP then use opt 10 (Work with TCP/IP Host Table Entries). It's important that you specify two host names associated with your AS400 host IP address :
                    • the full one, in the format host_name.domain_name
                    • and the domain_name by itself

                    to allow a correct routing of the electronic mail from the service provider.

                    Code:
                    Work with TCP/IP Host Table Entries 
                    Host names 	 
                        Name . . . . . . . . . . . . .   	  	'SODAS002.MyCompany.com'  
                        Name . . . . . . . . . . . . .   	  	'MyCompany.com'
                    Originally posted by typeroon
                    About the Antique SNDDST command, I am not aware of another command to achieve it. Can you tell me what is the command that could let me send an email to an external smtp server so it is relayed to any external email address ?

                    For your information, We are running AS400 V5R4M5
                    Check out the Giovanni B. Perotti's MIME & Mail (MMAIL) utility here.
                    Last edited by Mercury; January 3, 2011, 05:33 PM.
                    Philippe

                    Comment


                    • #11
                      Re: SNDDST vs sender address (when email is received at destination)

                      Im with Philippe...use the free tool mmail....

                      here is another example using api QtmmSendMail....

                      All my answers were extracted from the "Big Dummy's Guide to the As400"
                      and I take no responsibility for any of them.

                      www.code400.com

                      Comment


                      • #12
                        Re: SNDDST vs sender address (when email is received at destination)

                        Originally posted by jamief View Post
                        just 4 fun i changed my address to michellerodriguez@OMG.com see image for received email.

                        Now this sending thru the systemi.
                        PHP Code:
                        SNDDST TYPE(*LMSGTOINTNET((jamie@code400.com))   
                        DSTD('This is a test of snddst')                   
                        MSG('This is the message section')                 
                        LONGMSG('this is the long message'
                        Hey Jamief,

                        I found why it was not working. I may look stupid but in order to help some other people that may have the same issue, I will explain exactly what I found. (I know, you already told me that but I did not undertand it that way. Sorry about that.)

                        Previously, you told me that I just had to do F19 (Change name for SMTP) to write the desired SMTP name.
                        I told you that I already did that. And it was true but I did it for the directory entry where I wanted to send the email.

                        ie: TYPERROON SODAS002 = typerron@mydomain.com

                        In fact, what I just found (reading your replies) is that the F19 must be done on the WRKDIRE entry of the AS400 user that is doing the SNDDST command.

                        After doing that, it worked perfectly.

                        thanks again and sorry if I did not understood correctly the first time.




                        jamie
                        Last edited by kitvb1; January 5, 2011, 01:20 AM. Reason: Fixed quote tags

                        Comment


                        • #13
                          Re: SNDDST vs sender address (when email is received at destination)

                          Perfect.... Glad it worked out.
                          All my answers were extracted from the "Big Dummy's Guide to the As400"
                          and I take no responsibility for any of them.

                          www.code400.com

                          Comment

                          Working...
                          X