This topic is locked

HTML Email

5/5/2007 12:43:13 AM
ASPRunnerPro General questions
M
Michael7 author

Hi
I am having a problem with the below event. It is working when I send it with just one email address but wont work when I add in the Supplier_Email field as well. In the DB there will not always be a Supplier_Email but if there is I want it to email there as well. I have removed the body of this email as I know the problem lies in the email = line. Is the code creating problems because the email does not always exist in Supplier_Email?

If not could you please add the email in correctly for me.
Created with 4.1 build 225
Also could you please tell me when we will be able to use proceedures in ASP Runner & if it is possible to draw the sent from email from the DB by using the table field in the Common_Files.asp page
Thanks

Michael
<%

Sub AfterEdit()
'** Send HTML email ****

sqlQuery = "SELECT Employee, ID, Store, Store_Email, Dealer_Code, Admin_Employee, Handset_Fault, Original_Handset, Original_Handset_Imie, Original_Invoice, Date_Returned, Date_Purchased, Supplier_Fax, Supplier_Phone, Supplier_Account, Supplier, Status From DOA_System WHERE ID = "&GetRequestForm("editid1")
Set sqlRecord = dbConnection.Execute(sqlQuery)

If Not sqlRecord.EOF Then
email = ""&sqlRecord("Store_Email") _please add SupplierEmail field here

subject = "The "&sqlRecord("Store")&" (Requests RA for : "&sqlRecord("DealerCode")&""&sqlRecord("ID")&")"

message = "<body bgcolor=""#E4E4E4""><table style=""border-collapse: collapse"" cellpadding=""3"" width=""85%"" id=""Main"" align=""center"">" &vbCrLf &


" <tr bordertop=""1"">" &vbCrLf &

" <td bgcolor=""#4A4A4A"" align=""center"" width=""100%"" <font color=""#FFFFFF"">This RA Request is Automated. Please respond with RA via Store Email</font></td>" &vbCrLf &


main body removed

" </tr>" &vbCrLf &_

" </table></body>"
End If

sqlRecord.Close

Set sqlRecord= Nothing

sendmail email, subject, message
'** Redirect to another page ****

Response.Redirect "/Administration/DOA_Administration/output/DOA_System_list.asp"
End Sub

%>

Sergey Kornilov admin 5/6/2007

You can send email to more than one address. Email addresses should be comma separated.