Question : Sending two emails within same script

Hi,

I need to send two emails out using the same script.  Know how to send one but when I add another, it's just ignoring the code.  
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
'Sends email to Accounts...
			strBody = "A new expense claim has been approved by " & Request.Form("Approver") & " for " & TitleCase(Request.Form("Consultant")) & ".<br><br>"
			strBody = strBody & "It's now ready for you to pay under ID <strong>" & Request.Form("ClaimID") & "</strong></a>.<br><br>"
			
%>
<!--#include file="Resources/cdo-message-server.asp"-->
<%
					 
				'Message details...
					objMail.From		= strEmail
					objMail.To			= strAccEmail
					objMail.Subject		= "Claim as been approved - " & Request.Form("ClaimID")
					objMail.HTMLBody	= strBody
				
				objMail.Send
				 
			Set objMail = Nothing
		
				
		'Send update of status to consultant...	
			strBody = "Your expense form <strong>" & Request.Form("ClaimID") & "</strong> has been approved by"  & Request.Form("Approver") & " for " & TitleCase(Request.Form("Consultant")) & ".<br><br>"
			strBody = strBody & "It's now with Accounts for payment.<br><br>"
			
%>
<!--#include file="Resources/cdo-message-server.asp"-->
<%
					 
				'Message details...
					objMail.From		= strEmail
					objMail.To			= strConsEmail					
					objMail.Subject		= "New Expense Form Added - " & Request.Form("ClaimID")
					objMail.HTMLBody	= strBody
				
				objMail.Send
				 
			Set objMail = Nothing
		
		End If

Answer : Sending two emails within same script

objMail.Send 'below this
                         
Set objMail = Nothing 'Disable this code it will work

Hope this helps
            
                  
Random Solutions  
 
programming4us programming4us