Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 18th, 2006, 06:29 AM
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


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
sending e-mails How To?? saudyonline General .NET 13 November 17th, 2006 01:00 AM
Sending mails. rupen Javascript How-To 1 October 25th, 2005 07:22 AM
INFO on Sending e-mails Varg_88 Beginning PHP 6 November 10th, 2004 04:19 AM
Sending e-mails using C# lily611 General .NET 3 June 30th, 2004 05:46 AM
Sending mails rajeshnerenki Pro VB 6 4 September 25th, 2003 03:34 AM



All times are GMT -4. The time now is 06:05 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.