473,385 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Inputting dbase variables to ASPEmail code

Hi,
I currently have a very wierd workaround to a simple problem. I have a page that selects a user from the dbase, works fine. Then I have an emailing code from ASPemail.com to send confirmation emails. But i'm using Post data for this. So I select stuff from a dbase, put it into "hidden" fields, and recall the page. This then inputs the data I need into the emailing function to send the emails.

Code looks like:
Mail.Body = Request("Title")&". "& Request("Known_As")&". "& Request("Surname")& ", has selected: "& Request("Membership_Type")& ", using the Username: "& Request("Username")& ", has just registered on Global Handicaps Skukuza "

Now instead of "& Request("Known_As")&" I would like to just have the dbase fields entered directly. So replace the code "& Request("Known_As")&" with "<%=(MembersRS.Fields.Item("EMAIL_ADDRESS").Value) %>"

What is the right way to do it as all i'm getting are errors. There must be some " or & i'm missing out.

Thanks
Chris
Feb 1 '07 #1
3 1383
iam_clint
1,208 Expert 1GB
<%=(MembersRS.Fields.Item("EMAIL_ADDRESS").Value)% >looks fine to me whats the errors and post your code
Feb 1 '07 #2
Hi,
Got the answer. The code should look like the following:
Expand|Select|Wrap|Line Numbers
  1. Mail.Body = Request("Title") &". " & MembersRS("EMAIL_ADDRESS") &". " & Request("Surname") & ", has selected: " & Request("Membership_Type") & ", using the Username: " & Request("Username") & ", has just registered on Global Handicaps Skukuza "
So instead of the POST input from Request I just put in the table MembersRS (note the EMAIL_ADRESS entry)

Great,
Thanks :)
Chris
Feb 1 '07 #3
Hey guys, I'm also trying to use ASPEmail to send an email when the form is submitted. The script tells me that the email was successsfully sent but I'm not seeing any emails. I enabled my SMTP server so that it allows me to transfer emails. I'm also running IIS on an XP machine locally. What could be the problem?

<%
' change to address of your own SMTP server
strHost = "MySite.GG.net"

If Request("Send") <> "" Then

Set Mail = Server.CreateObject("Persits.MailSender")
' enter valid SMTP host
Mail.Host = strHost

Mail.From = Request("From") ' From address
Mail.FromName = Request("FromName") ' optional
Mail.AddAddress Request("To")

' message subject
Mail.Subject = Request("Subject")
' message body
Mail.Body = Request("Body")

strErr = ""
bSuccess = False
On Error Resume Next ' catch errors
Mail.Send ' send message
If Err <> 0 Then ' error occurred
strErr = Err.Description
else
bSuccess = True
End If
End If
%>
Feb 12 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: jason | last post by:
Database: Access 2000 Host: Maximum ASP I am trying to work out the best way to send bulk email below the 1000 mark (about 800). I understand that I could either use ASPEmail or CDO although...
15
by: news.microsoft.com | last post by:
HI, ASPEmail to send to multiple recipients? I tried to use comma and semicolon but all the time give this message error: Error: 6 - 501 Bad address syntax nor :...
1
by: Andrew Wrigley | last post by:
Hi I am setting up emailing for an all Access contact management app and DO NOT want to use Outlook. Aspemail.dll (aspemail.com) works fine, but... Unless you pay the licence fee for the...
2
by: bcbrock | last post by:
I am trying to figure out how to query some data out of a dbase IV (.dbf) file sitting on a remote server from my MySQL/PHP/Web Server. Both servers are Windows Server 2003 SP2. My...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.