Wrox Programmer Forums
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 18th, 2006, 06:29 AM
Authorized User
Join Date: Dec 2005
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(this.name);" 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 = "[email protected]"
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: [email protected]</td></tr><tr ><td ><b> wwww.charismaone.com </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

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

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