Thread: sending mails
View Single Post
  #1 (permalink)  
Old July 18th, 2006, 06:29 AM
arabuafef arabuafef is offline
Authorized User
Join Date: Dec 2005
Location: , , .
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default sending mails

please can you help me at this problem:
i've wrote this page to get the to-email address and mail body, subject:

<%@ language=VBScript codepage=1256%>

function CheckFeilds(){

var toemail=document.frmadd.toemail.value

 if (toemail=="")
  alert("Enter E-mail Address");
if(confirm("Are u sure You want to Send the e-mail?")==true)
function list(address){
var toemail=document.frmadd.toemail.value
if (toemail == ""){
if (toemail != ""){
document.frmadd.toemail.value=document.frmadd.toem ail.value + "," + address ;}

<%'address2=request("address2") & "," & request("address")%>
<form name="frmadd" action="sendmail.asp" method="post">
<TD valign=top>
<table border="0" cellpadding="1" cellspacing="5" align="left">
 <% set rs=server.CreateObject("adodb.recordset")
sql="select * from Companies "
rs.Open sql,sdsn,adOpenKeyset,adLockReadOnly ,adCmdText

<td align="right">To</td>

<td width="50%"><input name="toemail" value="<%=address2%>" size=60></td>
<td align="right">Subject</td>
<td><input name="Subject" size=60></td>
<td VALIGN=TOP align="right">Message</td>
<td><TEXTAREA rows=10 cols=60 id=textarea1 name=body>

<td align="middle" colspan="2"><input type="button" style="LEFT: -1px; WIDTH: 100px; TOP: 0px; font:bold" value="Send" name="cmdsave" size="50" onclick="CheckFeilds()"></td>
<TD valign=top>
 <select size=10 style="LEFT: -1px; WIDTH: 155px; TOP: 0px" name="addresses" onchange="list(this.value);" >

<%do while not rs.EOF%>

  <option style="background-color:white" value="<%=rs.fields("companyaddress").value%>"> <%=Rs.fields("companyname").value%> </option>

    <% Rs.movenext%>

<%loop %>
<!--<table VALIGN=TOP border=1 cellspacing=0 bordercolor=Black>
<%do while not rs.EOF%>
<tr bordercolor=White>
               <td><input style="width:150px; font-size:10px; border-color:#FFFFFF; background-color:#FFFFFF" type="button" name=<%=rs("companyaddress")%> onclick="list(;" value="<%=Rs.fields("companyName").value%>" id=button1></td></tr>
 'set rs=nothing%>



and this page to send the mail:

<style type="text/css">


On Error Resume Next
Dim objMailer
Set objMailer = Server.CreateObject("Dundas.Mailer")

objMailer.TOs.Add request("toemail")
objMailer.FromAddress = ""
objEmail.SMTPRelayServers.Add "localhost"
objMailer.Subject = Request("Subject")

tmp= "<table width='70%' bgcolor='#F2F2F2'><tr>"
        tmp=tmp &"<th height='50' valign='top' background='images/HeadofMail.gif' scope='col'>&nbsp;</th>"
        tmp=tmp &"</tr><tr><td>"
    tmp =tmp & Request("body")&"</td></tr><tr><td class='unnamed22'><table style='font-size:14' align=right width='40%'><td >Jordan: Tel.: +962 6 5828394</td><tr ><tr ><td > Mobile: +962 7 96000399</td></tr><tr ><td >Lebanon: Mobile: +961 3 948032</td></tr><tr ><td >E-mail:</td></tr><tr ><td ><b> </b></td></tr></table></td></tr></table>"
        'Response.Write tmp

objMailer.HTMLBody = tmp

Set objMailer = Nothing
if Err <>0 then
 response.write "Done...message was sent"
 response.write err.description
end if

the problem is that the email is not received from all contacts
just few of them get the email
please help me at the prblem
thank you