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

hello,
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%>

<script>
function CheckFeilds(){

var toemail=document.frmadd.toemail.value

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

</script>
<%'address2=request("address2") & "," & request("address")%>
<form name="frmadd" action="sendmail.asp" method="post">
<TABLE >
<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
%>

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

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

</TEXTAREA></td>
</tr>
<tr>
<tr></tr>
<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>
</tr>
</table>
</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 %>
</select></td>
<!--<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(this.name);" value="<%=Rs.fields("companyName").value%>" id=button1></td></tr>
    <%Rs.movenext
    loop
   rs.Close
 'set rs=nothing%>

</table>
</TD>
</TABLE>-->

</form>




and this page to send the mail:


<style type="text/css">

</style>

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

objMailer.TOs.Add request("toemail")
objMailer.FromAddress = "emad@charismaone.com"
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: emad@charismaone.com</td></tr><tr ><td ><b> wwww.charismaone.com </b></td></tr></table></td></tr></table>"
        'Response.Write tmp
        'Response.End



objMailer.HTMLBody = tmp
objMailer.SendMail

Set objMailer = Nothing
if Err <>0 then
 response.write "Done...message was sent"
else
 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
yours.
arabuafef