473,671 Members | 2,340 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inputting dbase variables to ASPEmail code

2 New Member
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("Surnam e")& ", has selected: "& Request("Member ship_Type")& ", using the Username: "& Request("Userna me")& ", 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("EM AIL_ADDRESS").V alue)%>"

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 1391
iam_clint
1,208 Recognized Expert Top Contributor
<%=(MembersRS.F ields.Item("EMA IL_ADDRESS").Va lue)%>looks fine to me whats the errors and post your code
Feb 1 '07 #2
ChrisPols
2 New Member
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
Anthony1312002
12 New Member
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.CreateOb ject("Persits.M ailSender")
' enter valid SMTP host
Mail.Host = strHost

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

' message subject
Mail.Subject = Request("Subjec t")
' 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
3356
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 I believe that ASPEmail may be superior in that it offers SENDQUEUE command which will allow me to loop through my customer database and insert them into the TO fields.
15
11059
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 : email@dom,email@dom,email@dom or: email@dom;email@dom;email@dom
1
2425
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 premium features, you cannot access a smtp host that requires authentication with username and password.
2
11147
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 MySQL/PHP/Web server is running PHP 4.3.11, MySQL 4.0.24, and IIS. I have set a system DSN on the remote machine for the directory that contains the dbase file. The DSN name is SASIxp, and the actual file I'm trying to connect to is ADST.DBF.
0
8473
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8390
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8597
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7428
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5692
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4222
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4402
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2808
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.