Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: sendEmailNotification
Topic Summary: One Email Notification to multiple receivers
Created On: 21-Jul-2005 00:27
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 21-Jul-2005 00:27
User is offline View Users Profile Print this message


DJ Chang

Posts: 7
Joined: 21-Aug-2003

sendEMailNotification(
string fromDescription,
string targetAddress,
string subject,
string message)

How can I send an email notification to multiple users? It did not work when I use "; " in between target addresses, such as targetAddress="user1@company.com; user2@company.com". What are other options if sendEmailNotification is limited to one target address? Thanks.
Report this to a Moderator Report this to a Moderator
 21-Jul-2005 02:59
User is offline View Users Profile Print this message


cliff Bly

Posts: 58
Joined: 11-Apr-2003

I have used a skiplist to hold addresses and then have the email script loop thru the list.

Sadly 1 target address per use.. May have changed with DOORS 8.

-------------------------
Cliff Bly
Report this to a Moderator Report this to a Moderator
 22-Jul-2005 01:09
User is offline View Users Profile Print this message


DJ Chang

Posts: 7
Joined: 21-Aug-2003

Thanks for the reply. Like to get more clarification about the email script you mentioned. When it loops thru the list, do you mean it sends out same notification multiple times to each individual receiver, or one email to multiple receivers? If it is the latter, can you show me the trick?
Report this to a Moderator Report this to a Moderator
 22-Jul-2005 14:02
User is offline View Users Profile Print this message


cliff Bly

Posts: 58
Joined: 11-Apr-2003

Example below. Same notification multiple times.

User user
for user in userList do {
string uName = user.name
string email = user.email
string uSys = user.systemLoginName
if !null uSys && !null email then {
string eSubject = "DOORS SHUTDOWN AT 1145 THIS MORNING -- PLEASE EXIT DOORS BY THIS TIME"
string message = "Weekly Maintenance"
message = message "\n" "\n" "\n" "thanks."
bool Sent = sendEMailNotification("DOORS",email,eSubject,message)
if Sent then {//do something
}
}
}

-------------------------
Cliff Bly
Report this to a Moderator Report this to a Moderator
 22-Jul-2005 20:18
User is offline View Users Profile Print this message


DJ Chang

Posts: 7
Joined: 21-Aug-2003

Thanks. Let's hope it is improved in the newer version.
Report this to a Moderator Report this to a Moderator
 26-Jul-2005 04:54
User is offline View Users Profile Print this message


Pete Kowalski

Posts: 301
Joined: 7-Feb-2003

TIP: you could always have DOORS to send an email to a mail-list

-------------------------
pete.kowalski(at)motorola.com
Report this to a Moderator Report this to a Moderator
 29-Jul-2005 11:57
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Hi,

in Doors 7.1 there are many undocumented eMail functions.
Mainly there is sendEMailNotification, which sends the mail with high priority and preceeds your mail body text with

The following is a notification message from DOORS - please do not reply as it was sent from an unattended mailbox.
*****




string sendEMailNotification (string sFromDescription, Skip skpTo, Skip skpCc, Skip skpBcc, string sSubject, string sMessage)
string sendEMailNotification (string sFromDescription, Skip skpTo, Skip ckpCc, string sSubject, string sMessage)
string sendEMailNotification (string sFromDescription, Skip skpTo, string sSubject, string sMessage)
string sendEMailNotification (string sFromDescription, string sTo, string sSubject, string sMessage)
bool sendEMailNotification (string sFromDescription, string sTo, string sSubject, string sMessage)



The more interesting one is sendEMailMessage, which sends the mail with normal priority and without changing the mail body text :



string sendEMailMessage (string sFromDescription, Skip skpTo, Skip skpCc, Skip skpBcc, string sSubject, string sMessage)
string sendEMailMessage (string sFromDescription, Skip skpTo, Skip skpCc, string sSubject, string sMessage)
string sendEMailMessage (string sFromDescription, Skip skpTo, string sSubject, string sMessage)
string sendEMailMessage (string sFromDescription, string sTo, string sSubject, string sMessage)
bool sendEMailMessage (string sFromDescription, string sTo, string sSubject, string sMessage)




As you can see above there are many possibilities to enter the recipants. The one you are looking for is
Skip skpTo. This Skip list can contain many recipants. The key does not matter, the value must be a string.

This example code should work for your task :

Skip to = create
put (to, 1, "recv1@host1")
put (to, 2, "recv2@host2")

sendEMailNotification ("doors@yourhost", to, "DOORS-Subject", "DOORS-Message")


I hope this information will help you solve your problem.

Greetings
Reik Schroeder

Siemens AG Berlin

PS.: A long time ago I've asked Telelogic support for a normal priority eMail function - they answered that it is not possible.
But as described above it is ...

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 12-May-2008 19:54
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

K...Here's an interesting one.

I have a user that can run the attached script to send me an e-mail when I'm logged in under their user name on my computer. However, on their computer when logged in the script appears to work (no error message produced), but the e-mail is never sent.

Any ideas why this might work on one computer and not another using the same login?

-------------------------
Scott Boisvert
Engineering Tools Administrator
L-3 Communications - Avionics Systems
scott.boisvert@l-3com.com
Report this to a Moderator Report this to a Moderator
 12-May-2008 21:41
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

if (!null err) print err "\n"

Added the above after your send, and I get this error:
Could not resolve the IP Address for the specified mail server.

Don't know what to think of that.

- Louie
Report this to a Moderator Report this to a Moderator
 13-May-2008 12:26
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

Pasted the wrong one in there...but yeah I had the print statement in there, but I don't get an error.

Your error looks like what I would get before we set up DOORS for email. By assigning the mail server in the DOORS Database properties.

-------------------------
Scott Boisvert
Engineering Tools Administrator
L-3 Communications - Avionics Systems
scott.boisvert@l-3com.com
Report this to a Moderator Report this to a Moderator
 13-May-2008 12:52
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Scott look into whether port 25(i believe) is blocked. Emails are sent via that port from the client and it needs to be allowed. I know on our corporate network, we have to get the port unblocked on a per user basis.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 14-May-2008 13:29
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

Thanks David.

That was part of the problem, Port 25 is blocked at the router. The main reason is that our IT guys have different configurations for their e-mail across our 3 sites, doesn't make sense to me, but what the hell do I know.

I was able to fix the issue by changing the e-mail address that the e-mail was being sent to. Instead of using the coporate e-mail, which Exchange should be able to decipher to the division e-mail, I had to use our division e-mail address instead.

I.E.
Corporate e-mail: scott.boisvert@l-3com.com
Division e-mail: scott.boisvert@as.l-3com.com

Kinda stupid that I had to do that because noone uses the division e-mail addresses.

-------------------------
Scott Boisvert
Engineering Tools Administrator
L-3 Communications - Avionics Systems
scott.boisvert@l-3com.com
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.