Topic
  • 10 replies
  • Latest Post - ‏2013-04-30T05:02:04Z by KBSri
SystemAdmin
SystemAdmin
3180 Posts

Pinned topic To send a email via DXL script

‏2013-04-02T11:02:03Z |
Hi All,
Can anyone please help me to do a script in such a way that an email could be triggered from DXL editor via DXL scripting.

Consider the following scenario:

1.It should be able to trigger a mail from my account to some recipients.

Is this possible.Please help me out?
Thanks & Regards,
Shriraam
Updated on 2013-04-04T15:28:30Z at 2013-04-04T15:28:30Z by llandale
  • Gedinfo
    Gedinfo
    87 Posts

    Re: To send a email via DXL script

    ‏2013-04-02T13:20:10Z  
    Look in the DXL reference manual, you will find sendEMailMessage described.
  • llandale
    llandale
    3035 Posts

    Re: To send a email via DXL script

    ‏2013-04-02T14:51:05Z  

    sendEMailMessage() requires your DOORS service to be attached to your email service; this is not trivial.
    Here are my incomplete and possibly slightly incorrect notes on doing that:

     

    Feedback submitted for tech note:
    http://www-01.ibm.com/support/docview.wss?uid=swg21324459&myns=swgrat&mynp=OCSSYQBZ&mync=E
     
    The following info is true, as best as I can tell, and if so should be included:
    o  The 'SMTP Server' may also be known as the 'Relay server' on many systems.
    o  Emails are sent to the DOORS user specified on the Login Policy tab of the DB properties sheet,
        under 'Notify failed logins by email to:' field at at the bottom.  
        That DOORS user must have a valid Email specified.
    o  The 'mail account' on the General tab has an unknown use and can be blank.  
        You folks should prove this to yourselves and then clarify exactly what that is for.
    o  Emails are sent from a 'DOORS Mail Server' account.  
        Sorry for my ignorance, but I believe that is just generic and cannot receive emails.  
        I suspect perhaps that the 'Mail Account' field on the General tab is supposed to be the
        Sender of these emails ('from' and 'reply to'), but is not.
    o Contrary to documentation, Emails are sent from the client machine (not the DOORS server),
        so port 25 must be open in the fire wall for each client attempting to use DOORS;
        and must not be used for other purposes.

    If the database is not setup for Emailing and you have Outlook installed, you can send an email through Outlook as per one of these links:

    https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14580146&#14580146
    https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14488221&#14488221

    -Louie

     

     

     

     

     

    Updated on 2014-01-08T23:55:33Z at 2014-01-08T23:55:33Z by iron-man
  • llandale
    llandale
    3035 Posts

    Re: To send a email via DXL script

    ‏2013-04-02T14:53:34Z  
    sendEMailMessage() requires your DOORS service to be attached to your email service; this is not trivial.
    This technote says how:
    http://www-01.ibm.com/support/docview.wss?uid=swg21324459&myns=swgrat&mynp=OCSSYQBZ&mync=E

    The notes are wrong, the email is sent from your client not the DOORS server.

    If the database is not setup for Emailing and you have Outlook installed (and running) on your client, you can send an email through Outlook as per one of these links:

    https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14580146&#14580146
    https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14488221&#14488221

    -Louie
  • SystemAdmin
    SystemAdmin
    3180 Posts

    Re: To send a email via DXL script

    ‏2013-04-02T15:21:00Z  
    • llandale
    • ‏2013-04-02T14:53:34Z
    sendEMailMessage() requires your DOORS service to be attached to your email service; this is not trivial.
    This technote says how:
    http://www-01.ibm.com/support/docview.wss?uid=swg21324459&myns=swgrat&mynp=OCSSYQBZ&mync=E

    The notes are wrong, the email is sent from your client not the DOORS server.

    If the database is not setup for Emailing and you have Outlook installed (and running) on your client, you can send an email through Outlook as per one of these links:

    https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14580146&#14580146
    https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14488221&#14488221

    -Louie
    > The notes are wrong, the email is sent from your client not the DOORS server.

    I assume, that you can do both. You can send form the server and from the client. In our firm we have two doors servers, one for productive use an the other for tests only. And the same code will send a mail if it is performed on the productive server and will not on the test server. And in both situations it is the same client.

    > sendEMailMessage() requires your DOORS service to be attached to your email service; this is not trivial.

    It is as trivial as a set up of a normal e-mail-client or better a half client (SMTP only). If you can install outlook or thunderbird you can setup doors.

    > This technote says how:

    Exact. Normally you do not get much more stuff to install a client.
  • llandale
    llandale
    3035 Posts

    Re: To send a email via DXL script

    ‏2013-04-02T15:58:05Z  
    > The notes are wrong, the email is sent from your client not the DOORS server.

    I assume, that you can do both. You can send form the server and from the client. In our firm we have two doors servers, one for productive use an the other for tests only. And the same code will send a mail if it is performed on the productive server and will not on the test server. And in both situations it is the same client.

    > sendEMailMessage() requires your DOORS service to be attached to your email service; this is not trivial.

    It is as trivial as a set up of a normal e-mail-client or better a half client (SMTP only). If you can install outlook or thunderbird you can setup doors.

    > This technote says how:

    Exact. Normally you do not get much more stuff to install a client.
    I'm suggesting sendEMailNotification() leaves from the same computer as the DOORS client; thus port 25 must be open in your firewall for each client PC. If you run the DOORS client on the same machine as the DOORS server then it leaves from there.

    In your case I suspect your test DOORS service is not setup for Email.

    Well, "trivial" perhaps if you know what you are doing; it took us about 3 weeks to setup our DOORS to allow emailing. In fact, that technote includes much of our "lessons learned".

    -Louie
  • SystemAdmin
    SystemAdmin
    3180 Posts

    Re: To send a email via DXL script

    ‏2013-04-04T04:58:12Z  
    • llandale
    • ‏2013-04-02T14:53:34Z
    sendEMailMessage() requires your DOORS service to be attached to your email service; this is not trivial.
    This technote says how:
    http://www-01.ibm.com/support/docview.wss?uid=swg21324459&myns=swgrat&mynp=OCSSYQBZ&mync=E

    The notes are wrong, the email is sent from your client not the DOORS server.

    If the database is not setup for Emailing and you have Outlook installed (and running) on your client, you can send an email through Outlook as per one of these links:

    https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14580146&#14580146
    https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14488221&#14488221

    -Louie
    Hi Louie,

    You're perfect! It worked amazingly. I could send mails from my client server.

    Can you please let me know how to add CC to the list.

    The following lines of the code are:

    string CCField = "ABCD@XYZ.com"
    string SentFrom = "ABC@XYZ.com"

    bool SendIt = confirm("Confirm to Send; Cancel to Display")
    fEmail_Outlook_CreateMail(SendIt, ToField, "", "", CCField, "","", SentFrom , "test", "") //Line number 60

    I am getting an error in calling the function create mail.
    Line 60: False arguments for the function 'fEmail_Outlook_CreateMail'
  • llandale
    llandale
    3035 Posts

    Re: To send a email via DXL script

    ‏2013-04-04T15:28:30Z  
    Hi Louie,

    You're perfect! It worked amazingly. I could send mails from my client server.

    Can you please let me know how to add CC to the list.

    The following lines of the code are:

    string CCField = "ABCD@XYZ.com"
    string SentFrom = "ABC@XYZ.com"

    bool SendIt = confirm("Confirm to Send; Cancel to Display")
    fEmail_Outlook_CreateMail(SendIt, ToField, "", "", CCField, "","", SentFrom , "test", "") //Line number 60

    I am getting an error in calling the function create mail.
    Line 60: False arguments for the function 'fEmail_Outlook_CreateMail'
    For the function declaration I see 1 boolean parameter and 6 string parameters.
    • bool fEmail_Outlook_CreateMail(bool in_AutoSend, string in_SendTo, in_SendCC, in_SendBCC, in_SentFrom, in_Subject, in_Body)
    In your function call I see 1 boolean and 9 string parameters.
    • fEmail_Outlook_CreateMail(SendIt, ToField, "", "", CCField, "","", SentFrom , "test", "") //Line number 60

    I think you want this:
    • fEmail_Outlook_CreateMail(SendIt, ToField, CCField, "", SentFrom , "test", "") //Line number 60

    -Louie
  • BuddyD
    BuddyD
    5 Posts

    Re: To send a email via DXL script

    ‏2013-04-15T20:04:41Z  
    • llandale
    • ‏2013-04-04T15:28:30Z
    For the function declaration I see 1 boolean parameter and 6 string parameters.
    • bool fEmail_Outlook_CreateMail(bool in_AutoSend, string in_SendTo, in_SendCC, in_SendBCC, in_SentFrom, in_Subject, in_Body)
    In your function call I see 1 boolean and 9 string parameters.
    • fEmail_Outlook_CreateMail(SendIt, ToField, "", "", CCField, "","", SentFrom , "test", "") //Line number 60

    I think you want this:
    • fEmail_Outlook_CreateMail(SendIt, ToField, CCField, "", SentFrom , "test", "") //Line number 60

    -Louie

    Can you all send me this DXL to Send Email Pretty Pleas.

  • BuddyD
    BuddyD
    5 Posts

    Re: To send a email via DXL script

    ‏2013-04-15T20:10:34Z  
    Hi Louie,

    You're perfect! It worked amazingly. I could send mails from my client server.

    Can you please let me know how to add CC to the list.

    The following lines of the code are:

    string CCField = "ABCD@XYZ.com"
    string SentFrom = "ABC@XYZ.com"

    bool SendIt = confirm("Confirm to Send; Cancel to Display")
    fEmail_Outlook_CreateMail(SendIt, ToField, "", "", CCField, "","", SentFrom , "test", "") //Line number 60

    I am getting an error in calling the function create mail.
    Line 60: False arguments for the function 'fEmail_Outlook_CreateMail'

    Is yours working now, can send me a copy?

  • KBSri
    KBSri
    104 Posts

    Re: To send a email via DXL script

    ‏2013-04-30T05:02:04Z  
    • BuddyD
    • ‏2013-04-15T20:10:34Z

    Is yours working now, can send me a copy?

    Yes, it is working fine.