Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    ASP




ASP And Email


I have IIS 5.1 installed on my cpu with the SMTP service. Am I able to create an object to send email with that, or do I need some third party program installed. Anyone have a sample script?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Email Validation Of Email Address Within An Access Database
Im running a simple mail system program which emails newsletters to a database list of 3000+ users.

The program loops through a database containing the emails and sends them out using ASPEmail.

My question is, is there some way i can validate each email address so that if there are invalid characters e.g. the space in "blah @blah.com"
it will skip the record and continue the loop.

At the moment i have a working program however, whenever the program comes across an invalid email address it stops at that record and prevents the program from emailing any further.

CDONTs - Problem Formatting An Email, From Form To Email
I am having a problem formatting an email message which comes from a form.

I am currently having difficulty with the <br> tag which I am using for line spaces within my email. I am getting an expected statement error message which is pointing to the line which is underlined below. I can't think what is causing this.

The code for my processing page is below:-

Generating Email Address And Textarea To Be Inlcluded On Email
1. I want users to type in their email address on a textfield, and after users press the "Submit" button. The info will automatically go to another person's email to receive a compliment, suggestion, etcetera.

2. Another is how to include the message written on a textarea of a form with the ASP code supplied below: Code:

Asp Email Verification Check Valid Email Thru Mx Record
how to write to check verification valid email thru nslookup or mx record or dns record. Is it possible to do that. Is there any tutorial from sitepoint, previously found it but i lost the link.

example to check assume test@domain.com is not a real email, abc@domain.com is real email
how do u check it.

Cdonts Email Script Won't Send Email
i used the following script but it won't send the email. any suggestions why?

<%
Dim TBdy
Dim MyCDO
CR = Chr(13)
Set MyCDO = Server.CreateObject("CDONTS.NewMail")
MyCDO.From = "person@something.org"
MyCDO.To = "allstar@aol.com"
MyCDO.Subject = "collegebound info"
TBdy = Request.Form("cb_name")
MyCDO.Body = TBdy
MyCDO.Importance = 1 (Normal)
MyCDO.Send
Set MyCDO = nothing

%>

Email Form - Verify Email Address
Just starting to play with scripts, and need a little guidance. I want to check to make sure that the email addresses users enter in a form are identical before it will allow them to submit. here's what i have:

the variable for the second email address is EmailFrom2

'validation
Dim validationOK
validationOK=true
If (Trim(EmailFrom)="") Then validationOK=false
If (validationOK=false) Then Response.Redirect("emailerror.htm?" & EmailFrom)
If (Trim(Name)="") Then validationOK=false
If (validationOK=false) Then Response.Redirect("nameerror.htm?")
If (Trim(CityState)="") Then validationOK=false
If (validationOK=false) Then Response.Redirect("citystateerror.htm?")
If (Trim(SchoolName)="") Then validationOK=false
If (validationOK=false) Then Response.Redirect("schoolnameerror.htm?")

ASP Email Form: Sends To Some Email Addresses But Not Others..
here is the script i use:

Set myMail=server.CreateObject("CDO.Message")
myMail.Subject="subject"
myMail.From="me"
myMail.To=request.form("email")
myMail.TextBody="hello"
myMail.Send
set myMail=nothing

this script sends emails to some addresses but not others--and its based on the email service it's sending to. for instance, hotmail email addresses get the email, but mail.com email addresses dont get the email. i have tried sending it to other email hosts, too, and still, some work, some don't. what is going on here?

Email Through CDONTS Using ISP Email Server
I am using CDONTS component to send email in ASP.

The code is some thing like this:

Dim Mail
Set Mail = Server.CreateObject("CDONTS.Newmail")
mail.From = "abc@hotmail.com"
mail.to = "xyz@hotmail.com"
mail.subject = "Test Email Subject"
mail.body = "This is Email body message"
mail.send

Now the question is that this code will use the Default Virtual SMTP Server in IIS, but I want to use my ISP's SMTP server. please tell me how to do this. I have used my ISP's email server in Outlook express and it is working fine. Please do not suggest to use "CDO" or "CDOSYS" to use for sending emails because I must have to use "CDONTS".

Remove Email Address/ Pseudo Email Address
has anyone got a function or subroutine which will remove blank out or remove email addresses.

i've wrote a function which will remove valid email addresses, it's pseudo addresses such as "blah @ blah.com" or "blah_at_blah_dot_com" or "blah_at_blah_._com"

the function is basically to stop users posting an email address in a message.

ASP Email
I have online order form that consists of textarea, textbox, radio button, check buttons and etc.. after that, click to submit via email with order form details to someone..

so i need to know what codings to do this to email to someone with order form details only..no need for db so can u please kindly show me how to do it?

Com + Email
I've created an com+ application for sending emails with multiple attachments.The component looks like this:

Public Function SendMail3(toAddr, whoAddr, docSubj, docMsg, ByVal docType As Integer, Optional cc = "", Optional bcc = "", Optional sFolder = "", Optional user = "")
On Error GoTo MailErr
Set oFlds = oConf.Fields
oFlds(cdoSendUsingMethod) = cdoSendUsingPort
oFlds(cdoSMTPServer) = SMTPSrvr
oFlds(cdoSMTPServerPort) = SMTPPrt
oFlds(cdoSMTPAuthenticate) = cdoBasic
oFlds.Update
Set oMail = New CDO.Message
oMail.From = whoAddr
oMail.To = toAddr
If (cc <> "") Then
oMail.cc = cc
If (bcc <> "") Then
oMail.bcc = bcc
If oFSO.FolderExists(sFolder) Then
Set oFolder = oFSO.GetFolder(sFolder)
For Each oFile In oFolder.Files
If InStr(oFile.Name, "_" & user) > 0 Then
oMail.AddAttachment oFile.Path
FileSize = Format((FileLen(oFile) / 1024) / 1024)
SumSize = SumSize + FileSize
oFSO.DeleteFile (oFile)
End If
Next
End If
End If
End If
If ((docType Mod 2) = 0) Then
oMail.TextBody = docMsg
Else:
oMail.HTMLBody = docMsg
End If
If (SumSize > 10) Then
ErrorStrMail = "Attachment size too large!"
GoTo MailFlee
End If
oMail.Subject = docSubj
Set oMail.Configuration = oConf
oMail.Send
MailFlee:
Exit Function
MailErr:
ErrorStrMail = Err.Number & ":" & Err.Description
Resume MailFlee
End Function

When I call this component from an asp page,I don't get any error,but the mail doesn't work.....did I do something wrong?

Email
I have set up an interactive database with a .asp page requesting information to include an email address. After receiving a response and viewing the database no email address is entered. How do I set up my table to except an email address?

Email CDO
can you use free email accounts (hotmail. yahoo) too send emails with CDO?

Email
Is there anyway to send email with ASP without downloading a bunch of stuff? I am new to ASP and I am using IIS on my computer and I can find anyway to send emails from my site.

Email To All
I need to be able to email to all email addresses in db (like a newsletter) I have seen some code samples but really need something simple and web based.

Email + CDO
I am sending email using CDO..the code I am using sends an ASP page,
the HTMLpart is recognised,but<%code %> is not(basically I am passing some query strings to ASP page),

SUB SENDEMAIL(refno1)
Dim myMail
dim mailmessage
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="mymail@mydomain.com"
myMail.To="ravi@v.com"
myMail.CreateMHTMLBody "http://localhost/mailer/thank_you.asp"
myMail.Send

'mymail.AttachFile
'mymail.Send
end sub

Email Via ASP
Does anyone knows about any sample code that I may be able to use to send email when an user click the submit button?

Asp Email
I am developing an HTML page which will eventually be sent as an email,
I want to pass a variable to this page (the email will be sent to a number of customers)
which I can then pull out the other side and use to id the person who recieved the mail.

I will have a link on the email to a web form which i need to include this id number,pulling it out of the email is fine, I just use a querystring, but I just cant get it in there, as I cannot use asp in the email.

By the way Im using a SQL data base including a name, unique ID and an email adress.

ASP Email
I am using CDONTS with winnt and all the sent emails are sitting in the QUEUE directory in c:inetputmailroot.

From Csv To Email
I'm a php guy being forced to work with asp. I have a csv file that is going to have 100 names e-mail addresses. I need to create a script that will read thru the file and then send out one e-mail per name. I've had success adapting brainjar's scriipt for my needs in the past but am not sure on how to read a csv file to get the names and addresses.

I'm looking for some advice on reading a csv file to load the values into an array and then how to handle looping thru it 100 times.

Email
I need help sending an email.

This is what I'm using to process it:
<%
my_from=request("mail-fromName")
my_fromAddress=request("mail-fromaddress")
my_to=request("mail-toName")
my_toAddress=request("mail-toaddress")
my_subject=request("mail-subject")
my_relay=request("mail-relay")

I want to be able to redirect and I don't know if this is the best way to do it or not. I also want to include it in my project but when I try to place it inside my project it gives me an error that there can only be one declarative. Please help as I am new to ASP

Email In ASP
I'm using the following codes to send the HTML form as an email. While submitting the form i'm not getting any error message. But i'm not getting the email also.

<%
Dim Mail
Set Mail=Server.CreateObject("CDONTS.NewMail")
Mail.To="me@mydomain.com"
Mail.From=Request.Form("FirstName,Email")
Mail.Subject="Listener response"
Mail.Body = "Language ="+ Request.Form("cboPrimary") + chr(13) + "Program Name ="+request.Form("cboSecondary")+ _
"Listener's Name=" + request.form("FirstName") + request.form("LastName") + chr(13) + _
"Address="+request.form("Address")+chr(13) + "Phone Number="+request.form("DirectPhone") + chr(13) + "City=" + _
request.form("CityStateZip") + chr(13) + "Email ID=" + request.form("Email") + chr(13) + "Comments=" + request.form("Comments")

Email Thru Asp
i have a requirement of sending an email thru ASP, I am using Interdev to
develop the asp
page to send the mail, i am using windows XP & IIS 5.0 version.
i am using CDONTS, i downloaded the dll and have registered it in registry,
my problem is, code seems to be working and email is not being sent, i have
tried out serveral things which
were listed in websites but nothing i got right. all the mails are being
stored in queue folder in
Inetpub/mailroot folder. i doubt whether the norton antivirus which i have
installed is blocking or any settings i have missed out in SMTP properties
or in IIS settings.

Email Sent
How come my image is not included sent through email Code:

.
.
.
mbody=mbody&"<br><br><table width='200' border='1'>"
mbody=mbody&"<tr>"
mbody=mbody&"<th scope='col' bgcolor='#009900'><img class='logo' src='images/logo.gif' alt=''/></th>"
mbody=mbody&"</table>"

Mail.Body = mbody
Mail.Send
Set Mail = Nothing

Email Using Asp
Can any body help me to build code to send email asp.

Email
I dont know how to send email using cdonts with html tags.

Email Using ASP
Can we send automated emails using ASP without using SMTP.

Email
I am trying to send an email.The email which gets sent to the person right now consists of the contents which he filled out before hitting submit for ex:
name,date,phone,emailaddress...

Apart from this information to be sent ,i want to send normal information to the sender in the same email which says something like this: Code:

Email And Asp
I have some code to send an email in asp, but I cant figure out how to create hyperlinks within the text. Heres some of my code which I have so far:

sBody = sBody & "Created By <a href:="mailto:"&userEmail&"> & userName &"</a>" Chr(13)

userEmail and userName are taken from a from.

Email Using Asp
How can i send an Email using ASP, i mean, let's say a user is registering .I want to send him an email with his user info,is it Possible?

Email
I have an ASP automatic email confirmation code on Windows 2003 Server. My problem is that the message can be submitted to only some email accounts such as hotmail or yahoo, but cannot to my office account. Why? Also, for hotmail accounts, the email is sent to junk mailbox instead of inbox. Why this happens? Do I need to set up any special SMTP configurations?

Email Using ASP
Is it possible to create a script in ASP to retrieve email from an inbox such as Join Bytes!? I know its possible to send email, but i want to receive. any way possible.

Email
I want send one image and some text inside the image as mail. how can i do it in asp.

Email In ASP
I need to send an email from my ASP page when a user clicks a button, but my page is on a stupid public education server. I can't use CDONTS and probably not SMTP either. How can I do it without the <form action="mailto:"> thing?

Email
I have an email asp form set up where the user types in their email address, among other info. The form comes to me in an email, no problem. I want a copy to go back to the sender. His address is contained in EmailAddress. I've tried the following, among other things:

Set objNewMail = Server.CreateObject("CDONTS.NewMail")
objNewMail.From = "form@provisionsconsulting.com" 'Request.Form("EmailAddress")
strTo = Request.Form("EmailAddress")
objNewMail.To = strTo
objNewMail.To = selahfalk@hotmail.com

I also tried this: objNewMail.To = Request.Form("Email Address") but neither of these worked.

Email Using CDO
We sent out an email today to a list of subscribers from our database using
ASP and CDO. For some reason, many people received it twice, including
myself.

I checked the database and there were do duplicate records and I
know for sure that I have no other email address forwarding email. I checked
my code and all seems ok. Perhaps someone can take a look at it and see if I
screwed up somewhere? It was sent to over 9,000 email addresses. When I sent
a test email from the database to 16 internall email addresses, everyone got
it just fine and only received one copy, as planned. Code:

Asp Email
After months of tryin to work it out, I have finally managed to creat a feedback page where the uses writes a message and it automatically sends to my email.

I have 2 email addresses. One for the manager of the company and one for me the webmaster. I was wondering if it is possible to use a dropdownlist so that the user can specify wether they want to contact me or the manager. And depending on what they chose, my asp page can chose the relevant email address. I was thinking of using a sort of IF Statement, but I am a total novice to ASP. Code:

Email And SPAM
I had a PHP script written to send email and it had a lot of SPAM issues.

With an ASP email script, what can I do to make the script secure from spammers?

Sending Email
I have a few queries regarding on email. Currently my web hosting provider uses Windows 2003 Server IIS 6.0 to host my ASP websites. In my own PC, I am also currently using Win XP Profession IIS 6.0 to run my ASP files.

I would like to create a pogram that would automatically sent out an email. But the problem is I have know that CDONTS do not work for Windows 2003 Server or XP Professional. It only currently work for Win 2000 Server.

Please help and perhaps show me the code of sending an email out automatically. Is there a code that can work for all servers?

Email System
I wanna build an email/messaging system whereby all members of a portal can send messsages to each other (internally). An example of this application would be the system available in www.friendster.com whereby all friendster members can message each other. Each member has his/her own inbox, trash, sent messages and so on. Can anyone help me with this? I would be eternally grateful

Secondly, i need help with building a forum as well. So far i'm having difficulties getting one that is easily customisable.

Email Form In ASP
i want to create an email form in ASP that can send emails to one and if possible multiple email addresses.

1. what requirements do i need. ie. web hosting .etc

Is it possible to make a form with a dropdown box for the different email addresses?

does anyone know where i can download a copy of something like this or have a copy themselves?

It can be just a simple type in your name, comments and submit form. just anything that works and how i get it to work.

URL In Email Error
I am not getting the url in email that I want to receive after a user completes a job application form. The url is in bold and red. Is there something wrong in my code ?
To clarify here is my code:

Automated Email
I need to send an automated email each day (Member expiration notices). The data sits in an SQL Server but SQL Mail is not available.

Building an .asp page that makes this happen isn't a problem, but that page would have to be loaded each day for the process to run....

Email Question
I have an asp page that returns a record from my SQL database based on a
custom query. One field in the database is email address. I would like the
field displayed as a link (is working) and when the user clicks on it, their
email client opens. Here is the code:

<%="<a href=""" & FP_FieldLink(fp_rs,"Email") & """>" &
FP_Field(fp_rs,"Email") & "</a>"%>

I tried inserting mailto: in the a href statement but it does not work. Any
ideas?

Email Validation Msg
I have been trying to use a function that checks that an email is syntactically correct (ie. it contains @ and .), however I have given up with the method I was trying - at the end of my tether I was. I would like something in the form of one of my other validation msgs below. Any ideas? Code:

Sending An Email From Within ASP
I have a form which will be processed by being sent to an ASP page. I would
like the ASP page to take the data from the Request.QueryString (which I
know how to do) and format it so I can have it emailed to me in a nicer
format. My problem is that I do not know how to have ASP send an email. I
know how to send an email using the mailto: protocol by making it look
something like the following:

MAILTO:username@mydomain.com?SUBJECT=mysubject?MES SAGE=mymessage

However, this will usually take the user to their default email client and
ask them to send an email by putting the specified subject and message in
for them, but wait for them to do any desired editing and click their send
button. I simply want the email to be sent straight from ASP. Is this
possible?

BEST EMAIL Object Please...
we have NT 4.0 server now, will be moving to WIN2K and ASP TO ASP.NET. Right now we have java.jmail.....

Sending An Email
Can anyone provide me with an example how I can send an email through ASP.NET!

Email Attachment
I have a problem don't know how to write the attachment file frm mail....

<html>
<head>
<title>Thank you for reply with us.</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<%@ Language=VBScript %>
<%
Dim strBody
Dim myElement

For Each myElement in Request.Form
Select Case Left(myElement ,3)
Case "txt","sel","rad":
strBody = strBody & Replace(Mid(myElement,4,len(myElement)),"."," ") & _
": "
if Len(Request.Form(myElement)) = 0 then
strBody = strBody & "UNANSWERED"
else
strBody = strBody & Request.Form(myElement)
end if

strBody = strBody & vbCrLf

Case "chk":
strBody = strBody & Replace(Mid(myElement,4,len(myElement)),"."," ") & _
": " & Request.Form(myElement) & vbCrLf
Case "are":
strBody = strBody & Replace(Mid(myElement,4,len(myElement)),"."," ") & _
": " & Request.Form(myElement) & vbCrLf
End Select
Next

strBody = strBody & vbCrLf & strFooter

'Time to send the email
'Dim smtp
Set smtp = server.CreateObject("CDONTS.NewMail")

'******************************************
' set the mail properties
'******************************************
smtp.Subject = "ApplicationForm"
smtp.From = "ApplicationForm"
smtp.To = "connie@auroraxsis.com"
smtp.Body = strBody


'******************************************
' fire off the email message
'******************************************
smtp.Send
'Response.Redirect "thankyou.asp"

'******************************************
' check return value error code
'******************************************
'if objMail.errorCode = mmeNone then
' Response.Redirect "thankyou.htm"
'else
' Response.Write ("Mail message was not delevered to the SMTP server." & "<br><br>")
' Response.Write ("Please try again later" & "<br><br>" )
' Response.Write ("The error code was :" & Cstr(objMail.ErrorCode) & "<br><br>" )
' Response.Redirect ""
'end if

'******************************************
' always destroy the object
'******************************************
' set smtp = Nothing

' Response.Write ("Thank you for advertising with us. We will revert to you soonest possible.")

' Response.Redirect strRedirectURL
%>
</HTML>

<script language="JavaScript">
<!--
//set message:
msg = "Welcome To International Education Counsultancy";
timeID = 10;
stcnt = 16;
wmsg = new Array(33);
wmsg[0]=msg;
blnk = " ";
for (i=1; i<32; i++)
{
b = blnk.substring(0,i);
wmsg[i]="";
for (j=0; j<msg.length; j++) wmsg[i]=wmsg[i]+msg.charAt(j)+b;
}

function wiper()
{
if (stcnt > -1) str = wmsg[stcnt]; else str = wmsg[0];
if (stcnt-- < -40) stcnt=31;
status = str;
clearTimeout(timeID);
timeID = setTimeout("wiper()",100);
}

wiper()
// -->
//-->
</script>
<style>
BODY { margin-top: 0.00in; margin-left: 0.0in;}
BODY{
scrollbar-face-color:#f5f5f5;
scrollbar-arrow-color:#000000;
scrollbar-track-color:#ffffff;
scrollbar-darkshadow-Color:'#FFFFFF';
</style>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<table width="75%" cellpadding="0" cellspacing="0" height="40%" align="center">
<tr>
<td valign="middle" width="25%" height="288">
<div align="center"><img src="http://www.iec.com.my/images/tk.jpg" width="576" height="198"></div>
</td>
</tr>
</table>
</body>
</html>


Copyright © 2005-08 www.BigResource.com, All rights reserved