<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Send email notification with LotusScript</title>
	<atom:link href="http://www.indomino.net/blog/2009/09/16/send-email-notification-with-lotusscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.indomino.net/blog/2009/09/16/send-email-notification-with-lotusscript/</link>
	<description>My Passion about Lotus Notes, Domino, Email and IT Related</description>
	<lastBuildDate>Sun, 22 Jan 2012 15:31:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: eye zack</title>
		<link>http://www.indomino.net/blog/2009/09/16/send-email-notification-with-lotusscript/comment-page-1/#comment-1261</link>
		<dc:creator>eye zack</dc:creator>
		<pubDate>Wed, 12 Oct 2011 10:14:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.indomino.net/blog/?p=154#comment-1261</guid>
		<description>each form have field that hold email address.. ok.. how to notify email using that field? using agent that on schedule. so that mean each document will be notify using that email? please help me.</description>
		<content:encoded><![CDATA[<p>each form have field that hold email address.. ok.. how to notify email using that field? using agent that on schedule. so that mean each document will be notify using that email? please help me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eye zack</title>
		<link>http://www.indomino.net/blog/2009/09/16/send-email-notification-with-lotusscript/comment-page-1/#comment-1260</link>
		<dc:creator>eye zack</dc:creator>
		<pubDate>Wed, 12 Oct 2011 09:47:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.indomino.net/blog/?p=154#comment-1260</guid>
		<description>Here is sample of my agent. this agent sent notification only to me. my program is like this : every document have their own email which i set as (appid). is there any other simple code that you know for share??

Sub Domain (s As NotesSession, db As NotesDatabase)
	
	On Error Goto errhandler
	Print &quot;Domain - Start - &quot; &amp; Now()
	
	Dim view As NotesView
	Dim doc As NotesDocument
	Dim mailDoc As NotesDocument
	Dim rtitem As NotesRichTextItem
	Dim richStyle As NotesRichTextStyle
	
REM - for multiple user name	
	Dim i As Integer
	Dim j As Integer
	Dim UserList()
	Dim FinalList  As Variant
	Dim item1 As NotesItem			
	
	Set view = db.GetView(&quot;smv-DomainLessFive&quot;)
	Set doc = view.GetFirstDocument()
	
	If Not doc Is Nothing Then
		
REM - for multiple username		
		i = 0
		j = 0
		Set item1 = doc.GetFirstItem(&quot;appid&quot;)
		
		Forall a In item1.Values
			If a  &quot;&quot; Then
				i = i + 1
			End If
		End Forall
		i = i - 1
		Redim UserList(i)
		
		Forall b In item1.Values
			If b  &quot;&quot; Then
				If Not j &gt; i Then
					UserList(j) = b
					j = j + 1
				End If
			End If
		End Forall
		FinalList = Arrayunique(UserList, 0) 				
		
		Set mailDoc = New NotesDocument(db)
		Set rtitem = New NotesRichTextItem(mailDoc, &quot;Body&quot;)	
		Set richStyle = s.CreateRichTextStyle
		
		mailDoc.Form = &quot;Memo&quot;
		mailDoc.From = &quot;Domino Server&quot;
		mailDoc.Subject = &quot;Reminder - Domain Expiry Date Less Than 5 Day(s)!&quot;
		
		richStyle.Bold = True
		richStyle.NotesColor = COLOR_RED
		richStyle.FontSize = 14
		Call rtitem.AppendStyle(richStyle)
		
		Call rtitem.AppendText(&quot;Reminder - Domain Expiry Date Less Than 5 Day(s)!&quot;)
		Call rtitem.AddNewLine(1)
		Call rtitem.AppendText(&quot;Domain(s) Listed Below Requires Your Immediate Attention!&quot;)
		
		Do While Not doc Is Nothing
			
			richStyle.Bold = False
			richStyle.NotesColor = COLOR_BLACK
			richStyle.FontSize = 10
			Call rtitem.AppendStyle(richStyle)
			
			Call rtitem.AddNewLine(2)
			Call rtitem.AppendText(&quot;Company Name	: &quot; &amp; doc.company(0))
			Call rtitem.AddNewLine(1)
			Call rtitem.AppendText(&quot;Domain Name		: &quot; &amp; doc.DomainName(0))
			Call rtitem.AddNewLine(1)
			Call rtitem.AppendText(&quot;Domain License		: &quot; &amp; doc.DomainLicenseNumber(0))
			Call rtitem.AddNewLine(1)
			Call rtitem.AppendText(&quot;Expiry Date	: &quot; &amp; Cstr(doc.Domain_Expired_Date(0)))
			Call rtitem.AddNewLine(1)
			Call rtitem.AppendText(&quot;Agent Name	: &quot; &amp; Cstr(doc.DA_Name(0)))
			
			richStyle.Bold = True
			richStyle.NotesColor = COLOR_RED
			richStyle.FontSize = 10
			Call rtitem.AppendStyle(richStyle)	
			
			Call rtitem.AddNewLine(1)
			Call rtitem.AppendText(&quot;Total Day(s) Left	: &quot; &amp; Cstr(Cdbl(doc.Domain_Expired_Date(0)) - Cdbl(Date())))
			
			Set doc = view.GetNextDocument(doc)
		Loop
		
		richStyle.Bold = False
		richStyle.NotesColor = COLOR_BLACK
		richStyle.FontSize = 8
		Call rtitem.AppendStyle(richStyle)
		
		Call rtitem.AddNewLine(2)
		Call rtitem.AppendText(&quot;Kindly act on it accordingly. Your immediate attention in this matter is much appreciated&quot;)
		Call rtitem.AddNewLine(1)
		Call rtitem.AppendText(&quot;** Note: This is a computer generated mail, therefore there&#039;ll be no sender name attached **&quot;)
		Call mailDoc.Send(False, FinalList) &#039;for multiple username	
		
	End If
	
finish:
	Print &quot;Domain - Start - &quot; &amp; Now()
	Exit Sub
	
errhandler:
	
	Print &quot;Sub/Function : &quot; &amp; Lsi_info(2)
	Print &quot;Error Line : &quot; &amp; Erl
	Print &quot;Error Message : &quot; &amp; Error
	
	Resume finish
	
End Sub</description>
		<content:encoded><![CDATA[<p>Here is sample of my agent. this agent sent notification only to me. my program is like this : every document have their own email which i set as (appid). is there any other simple code that you know for share??</p>
<p>Sub Domain (s As NotesSession, db As NotesDatabase)</p>
<p>	On Error Goto errhandler<br />
	Print &#8220;Domain &#8211; Start &#8211; &#8221; &amp; Now()</p>
<p>	Dim view As NotesView<br />
	Dim doc As NotesDocument<br />
	Dim mailDoc As NotesDocument<br />
	Dim rtitem As NotesRichTextItem<br />
	Dim richStyle As NotesRichTextStyle</p>
<p>REM &#8211; for multiple user name<br />
	Dim i As Integer<br />
	Dim j As Integer<br />
	Dim UserList()<br />
	Dim FinalList  As Variant<br />
	Dim item1 As NotesItem			</p>
<p>	Set view = db.GetView(&#8220;smv-DomainLessFive&#8221;)<br />
	Set doc = view.GetFirstDocument()</p>
<p>	If Not doc Is Nothing Then</p>
<p>REM &#8211; for multiple username<br />
		i = 0<br />
		j = 0<br />
		Set item1 = doc.GetFirstItem(&#8220;appid&#8221;)</p>
<p>		Forall a In item1.Values<br />
			If a  &#8220;&#8221; Then<br />
				i = i + 1<br />
			End If<br />
		End Forall<br />
		i = i &#8211; 1<br />
		Redim UserList(i)</p>
<p>		Forall b In item1.Values<br />
			If b  &#8220;&#8221; Then<br />
				If Not j &gt; i Then<br />
					UserList(j) = b<br />
					j = j + 1<br />
				End If<br />
			End If<br />
		End Forall<br />
		FinalList = Arrayunique(UserList, 0) 				</p>
<p>		Set mailDoc = New NotesDocument(db)<br />
		Set rtitem = New NotesRichTextItem(mailDoc, &#8220;Body&#8221;)<br />
		Set richStyle = s.CreateRichTextStyle</p>
<p>		mailDoc.Form = &#8220;Memo&#8221;<br />
		mailDoc.From = &#8220;Domino Server&#8221;<br />
		mailDoc.Subject = &#8220;Reminder &#8211; Domain Expiry Date Less Than 5 Day(s)!&#8221;</p>
<p>		richStyle.Bold = True<br />
		richStyle.NotesColor = COLOR_RED<br />
		richStyle.FontSize = 14<br />
		Call rtitem.AppendStyle(richStyle)</p>
<p>		Call rtitem.AppendText(&#8220;Reminder &#8211; Domain Expiry Date Less Than 5 Day(s)!&#8221;)<br />
		Call rtitem.AddNewLine(1)<br />
		Call rtitem.AppendText(&#8220;Domain(s) Listed Below Requires Your Immediate Attention!&#8221;)</p>
<p>		Do While Not doc Is Nothing</p>
<p>			richStyle.Bold = False<br />
			richStyle.NotesColor = COLOR_BLACK<br />
			richStyle.FontSize = 10<br />
			Call rtitem.AppendStyle(richStyle)</p>
<p>			Call rtitem.AddNewLine(2)<br />
			Call rtitem.AppendText(&#8220;Company Name	: &#8221; &amp; doc.company(0))<br />
			Call rtitem.AddNewLine(1)<br />
			Call rtitem.AppendText(&#8220;Domain Name		: &#8221; &amp; doc.DomainName(0))<br />
			Call rtitem.AddNewLine(1)<br />
			Call rtitem.AppendText(&#8220;Domain License		: &#8221; &amp; doc.DomainLicenseNumber(0))<br />
			Call rtitem.AddNewLine(1)<br />
			Call rtitem.AppendText(&#8220;Expiry Date	: &#8221; &amp; Cstr(doc.Domain_Expired_Date(0)))<br />
			Call rtitem.AddNewLine(1)<br />
			Call rtitem.AppendText(&#8220;Agent Name	: &#8221; &amp; Cstr(doc.DA_Name(0)))</p>
<p>			richStyle.Bold = True<br />
			richStyle.NotesColor = COLOR_RED<br />
			richStyle.FontSize = 10<br />
			Call rtitem.AppendStyle(richStyle)	</p>
<p>			Call rtitem.AddNewLine(1)<br />
			Call rtitem.AppendText(&#8220;Total Day(s) Left	: &#8221; &amp; Cstr(Cdbl(doc.Domain_Expired_Date(0)) &#8211; Cdbl(Date())))</p>
<p>			Set doc = view.GetNextDocument(doc)<br />
		Loop</p>
<p>		richStyle.Bold = False<br />
		richStyle.NotesColor = COLOR_BLACK<br />
		richStyle.FontSize = 8<br />
		Call rtitem.AppendStyle(richStyle)</p>
<p>		Call rtitem.AddNewLine(2)<br />
		Call rtitem.AppendText(&#8220;Kindly act on it accordingly. Your immediate attention in this matter is much appreciated&#8221;)<br />
		Call rtitem.AddNewLine(1)<br />
		Call rtitem.AppendText(&#8220;** Note: This is a computer generated mail, therefore there&#8217;ll be no sender name attached **&#8221;)<br />
		Call mailDoc.Send(False, FinalList) &#8216;for multiple username	</p>
<p>	End If</p>
<p>finish:<br />
	Print &#8220;Domain &#8211; Start &#8211; &#8221; &amp; Now()<br />
	Exit Sub</p>
<p>errhandler:</p>
<p>	Print &#8220;Sub/Function : &#8221; &amp; Lsi_info(2)<br />
	Print &#8220;Error Line : &#8221; &amp; Erl<br />
	Print &#8220;Error Message : &#8221; &amp; Error</p>
<p>	Resume finish</p>
<p>End Sub</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bfebrian</title>
		<link>http://www.indomino.net/blog/2009/09/16/send-email-notification-with-lotusscript/comment-page-1/#comment-1259</link>
		<dc:creator>bfebrian</dc:creator>
		<pubDate>Wed, 12 Oct 2011 09:26:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.indomino.net/blog/?p=154#comment-1259</guid>
		<description>@eye zack: you need to extract the list of users into a variant, than you can put them into the script above (variable strSendTo).
you can use notesdocumetcollection class to collect the documets from the view.</description>
		<content:encoded><![CDATA[<p>@eye zack: you need to extract the list of users into a variant, than you can put them into the script above (variable strSendTo).<br />
you can use notesdocumetcollection class to collect the documets from the view.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eye zack</title>
		<link>http://www.indomino.net/blog/2009/09/16/send-email-notification-with-lotusscript/comment-page-1/#comment-1258</link>
		<dc:creator>eye zack</dc:creator>
		<pubDate>Wed, 12 Oct 2011 09:03:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.indomino.net/blog/?p=154#comment-1258</guid>
		<description>hi, im still new. how to create a lotus script that will send an email to multiple user based on view selection from &quot;view&quot;?? thanks..</description>
		<content:encoded><![CDATA[<p>hi, im still new. how to create a lotus script that will send an email to multiple user based on view selection from &#8220;view&#8221;?? thanks..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kberg</title>
		<link>http://www.indomino.net/blog/2009/09/16/send-email-notification-with-lotusscript/comment-page-1/#comment-456</link>
		<dc:creator>kberg</dc:creator>
		<pubDate>Wed, 21 Jul 2010 09:48:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.indomino.net/blog/?p=154#comment-456</guid>
		<description>We use the Ionet Workflow Manager for developing our Workflow applications. With this engine workflows can be created very easy, no programmeing experience needed.</description>
		<content:encoded><![CDATA[<p>We use the Ionet Workflow Manager for developing our Workflow applications. With this engine workflows can be created very easy, no programmeing experience needed.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

