Dynamic Email Links
I am storing data in a table in Access, one of the fields contains email addresses (field is set as 'text' not 'hyperlink').
When I retrieve these records from my website how do I show them as mailto links?
Here is what i've tried...I don't even know if it's close.
<a href="mailto:" & <%=(rsContacts.Fields.Item("ContactEmail").Value)%> & >" & <%=(rsContacts.Fields.Item("ContactEmail").Value)%> & "</a>
I know that I could just add "Mailto:" before the recordset, but I don't want this to show on the page.
View Replies
ADVERTISEMENT
I have a CDOSYS mail and it's working ok but it sends plain text massage. But i want to send with images and links. But when i put a link with image in the .HTMLBody field like <a href="http://www.mysite.com/"><img src="file:///C:/My Documents/image.gif" border="0"></a> so, i got an error message.
Microsoft VBScript compilation error '800a0401'
Expected end of statement
/cdo/cdosys.asp, line 41 .....
View Replies
View Related
i have this output from a recordset
<%=(RS1.Fields.Item("EMAIL").Value)%>
how can i change this so that it's a hyperlink and when a user clicks on it, it will show the email address in "send to:" in outlook.?
View Replies
View Related
I am trying to generate an email from the webpage using code below, which
works fine. However I want to be able to include some dyanmic data how do I
go about it ?can anybody point me in the direction of some sample code ?
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<%
Dim myMail
Dim HTML
Set myMail = CreateObject("CDONTS.NewMail")
HTML = "<!DOCTYPE HTML PUBLIC""-//IETF//DTD HTML//EN"">"
HTML = HTML & "<html>"
HTML = HTML & "<head>"
HTML = HTML & "<meta http-equiv=""Content-Type"""
HTML = HTML & "content=""text/html; charset=iso-8859-1"">"
HTML = HTML & "<meta name=""GENERATOR"""
HTML = HTML & " content=""Microsoft Visual Studio 6.0"">"
HTML = HTML & "<title>HTMLMail</title>"
HTML = HTML & "</head>"
HTML = HTML & "<body bgcolor=""FFFFFF"">"
HTML = HTML & "<IMG SRC=""http://www.microsoft.com/library/"
HTML = HTML & "images/gifs/homepage/microsoft.gif"" BORDER=0 "
HTML = HTML & "WIDTH=167 HEIGHT=36 ALT=""Microsoft Corporation"">"
HTML = HTML & "<p><font size =""3"" face=""Arial""><strong>"
HTML = HTML & "Microsoft Exchange CDONTS Example</strong></p>"
HTML = HTML & "<p><font size =""2"" face=""Tahoma"">"
HTML = HTML & "CDO for NTS allows an easy way to send mail.<br>"
HTML = HTML & "This example shows how the content can be "
HTML = HTML & "an HTML page<br>"
HTML = HTML & "which allows you to send rich text and"
HTML = HTML & "inline graphics.</p>"
HTML = HTML & "</body>"
HTML = HTML & "</html>"
myMail.From="someone@microsoft.com"
myMail.To="someone@microsoft.com"
myMail.Subject="Sample CDONTS HTML Message"
myMail.BodyFormat=0
myMail.MailFormat=0
myMail.Body=HTML
myMail.Send
set mymail=nothing
Response.Write "Message Sent"
%>
</HEAD>
<BODY>
</BODY>
</HTML>
View Replies
View Related
I am currently building an emailing system into our asp management system. From this we will be able to setup mail templates (html stored in mssql database) and select who we want to send them to.The html in the database is only the middle part of the html file being sent. All the emails are based on the same design template using a single html file to which I pass a variable saying which body to get from the database <%=writeBody%>. So far this is all working fine and the emails are sending using cdo.
..createMHTMLBody
"http://localhost/helpCentric/responseSendForm.asp?"&qString
What i am trying to do now is personalise the emails and on the responseSendForm.asp I connect to the database and create variables such as fName, lName etc.I need to be able to write these variables in the html in the database which will then display in the body using the <%=writeBody%>.As you may have guess this is not working and I dont know enough aboutthe .createMHTMLBody to work out what to do.
View Replies
View Related
I have sent form data through email using .asp before but I have never done it when you are using a form that has createelements involved. I have a form w/ 3 inputs, two text inputs and one select combo box. if i click an add user button it will appear with another row of 2 text boxes and a combo box, and you can repeat up to as many as you need. I am trying to figure out how to mail all of those values to someone. Is there an easy way. Below I will attach the code that I use to name the fields when they are generated maybe it will help....
<SCRIPT language="javascript">
counter = 1
function addRow(id){
var tbody = document.getElementById(id).getElementsByTagName("TBODY")[0];
var row = document.createElement("TR");
row.setAttribute("id","tr"+counter);
var td2 = document.createElement("TD");
var input2 = document.createElement("INPUT");
input2.setAttribute("type","text");
input2.setAttribute("name","pName"+counter);
input2.setAttribute("id","name"+counter);
td2.appendChild(input2);
var td3 = document.createElement("TD");
var input3 = document.createElement("INPUT");
input3.setAttribute("type","text");
input3.setAttribute("name","userName"+counter);
input3.setAttribute("id","prc"+counter);
td3.appendChild(input3);
var td4 = document.createElement("TD");
var input4 = document.createElement("select");
input4.name = "Role"+counter;
input4.id = "Role"+counter;
option = document.createElement("OPTION");
option.value ="Admin";
option.text = "Admin";
input4.add(option);
option = document.createElement("OPTION");
option.value ="Read";
option.text = "Read";
input4.add(option);
option = document.createElement("OPTION");
option.value ="Read/Write";
option.text = "Read/Write";
input4.add(option);
td4.appendChild(input4);
row.appendChild(td2);
row.appendChild(td3);
row.appendChild(td4);
tbody.appendChild(row);
counter++;
}
</SCRIPT>
View Replies
View Related
I'm using CDO SYS to send email messages. I can attach a file just fine.
However, I need to attach an HTML page that's generated on the fly by my
ASP code. The attachment source code gets assembled into a VB string. How
do I attach this? I think there was an easy way in CDONTS but that's no
longer an option.
View Replies
View Related
In my code to send email from VBScript, I use standard CDOSYS code similar to
the following:
With oMsg
Set .Configuration = oCon
.To = """Admin"" <admin@mycompany.com>"
.From = """Joe Admin"" <jadmin@mycompany.com>"
.Subject = "Hey You!"
.TextBody = "Service(s) have failed!"
.Send
End With
I understand the use of the .HTMLBody property, as well as the
..CreateMHTMLBody method. So I know I can create an ASP or HTML page, and
pass it to the .CreateMHTMLBody method, to get the images truly embedded, so
the email source contains the cid:blahblahblah references to the images,
which is key to getting the email to display properly in web-based mail
clients.
My question is... how do I achieve the same thing (embed the images) that
the .CreateMHTMLBody method does automatically, manually, so I can also
inject values passed from a form postback into the email?
It seems that I shouldn't use the .CreateMHTMLBody method. It seems that I
need to manually accomplish what it accomplishes automatically, so I have
more granular control. But I have found no thorough online resources that
explain exactly how. I have thoroughly looked at all of the SDK information
pertaining to CDOSYS, and I am still in dire need of an example for
VBScript...
It seems that the .AddRelatedBodyPart method is part of the answer, but when
I use it to embed the images and fill .HTMLBody, rather than using the
..CreateMHTMLBody method, I do not see cid:blahblahblah in the email source,
and the images do not display properly in web-based mail clients such as
Outlook Web Access.
I really need some help on this. It would also appear that I am not alone.
I find plenty of questions on this, but no answers. Can anyone help with a
working VBScript example that embeds images into an email in a fashion that
yields the cid:blahblahblah in the email source, for the image references,
that does not use the .CreateMHTMLBody method to do the work automatically?
View Replies
View Related
I code that creates a calendar for each month and then it displays events from that month that are stored in a db. I need to loop through my recordset and display all the events, but I can't quite figure out how to do it. I am thinking I need to do an array. But I am not really sure.... any ideas. Here is where you can view the calendar. Code:
View Replies
View Related
Im new to ASP, and have hit a snag.I am trying to build a page that has 'A-B-C-D...' links along the top
of the page. When you click 'A', it goes to a table with everyones
usernames and grabs the ones that start with the letter A.
The problem is that the username field contains the names of people
who wrote an article, so in some cases there are actually two names in
this field. So for example, if it contained 'Bob, Jack', I would need
'Bob' to show up under B, and 'Jack' under J.
Im totally stuck as to how I might do this. Changing the layout of my
tables is no trouble if a different table setup helps
View Replies
View Related
I am taking an ASP course and I am stuck with one error message that I can't seem to correct.Here are the links:
http://www40.brinkster.com/ccraigbro...assignment.txt
http://www40.brinkster.com/ccraigbro...assignment.asp
View Replies
View Related
links.asp?id=whatever how do i do this, i know response.write is part of the code but i forgot the rest of it.
View Replies
View Related
I am creating a spot where people can redownload items if
they have access. I have everything written but the part
where people actually get to the page due to a huge
issue. So far there are 96 uniquie combinations of the 8
items they can download.
Here is the flow of my system.
Person creates a login, and in that login there is a spot
to put in a specific code for the items they need to have
access to. After that they are sent an email regarding
login location and login info.
The login site has all of the verfication to login, but i
am stuck at how to get the users to the actual page to
download due to the 94+ combos of items, (and that number
is only going to grow). Am i just screwed and this is
impossible without taking a HEAVY hit to the server or do
i need to find a program that does this?
View Replies
View Related
How do you create the links similar to the links on the forum Viewing: ASP Free Forums > Programming > ASP Development > Post New Thread .If there is examples on the net please let me know.
View Replies
View Related
I'm trying to make my URLs in ASP more search friendly, is there a way to do that? I'm using ASP.NET. Right now, I have an XSL file which is calling XML in my ASP files that builds the links. All content is generated from an XML file, so there is no database Here's a link example: .....
View Replies
View Related
i have a search engine which contains all of the links in an access db.
basically what i am wanting to know is:
is there some code i can make to query all the results for a matching word such as "elephant" all the results (url) in the database would be opened and checked, Any broken links would be removed.
does any one know how to do this. what i was thinking of doing was creating some code to open all the pages that match a search....say 50 open
i could then click through them closing them individually to check all urls rather than doing it manually
View Replies
View Related
I need to create a hyperlink to an .eml file so as to view it when the link is followed. The code is:
Response.Write "<a href='serverfoldermyeml.eml'>eml link</a>"
The problem is that the url automatically produced by this link is:
"mhtml:file://serverfoldermyeml.eml"
and the file cannot be found.
If I manually type "file:///serverfoldermyeml.eml" everything works fine.
How can I produce the correct url from my asp code? Any ideas?
View Replies
View Related
A friend has told me that links that worked fine in IE 6 on a PC are now not
working in IE 7. The only thing they can see is that these links have the
following common traits:
a) long file names, ie about 30 plus chars
b) underscores in the filenames.
c) They are derived from the old asp routine to force a pdf download rather
than open them up in the browser window.
I'm desperately trying to borrow a PC to install IE 7 (I don't want to
affect my own PC in anyway at the moment) to test this
View Replies
View Related
win 2k pro
sql server 2k
asp - vbscript
I got the below code from somewhere ages ago. I have a list of links on my site that link to other sites but I want to check if the link is a valid link automatically and if it fails after x checks (checks every 7 days) then to mark the link as a possible broken link
the below seems to take ages to process and was wondering if there is a better way to do the below. Code:
View Replies
View Related
i am having a textarea in which the website links r entered by the user separated by a comma(,). and the same i am storing in the database field with type memo. now i want to retrieve the entered links and display all the links separated so when the user clicks on a particular link the page for that page opens us.
View Replies
View Related
does anyone know how to request the static links off a page using XML and asp?
I would really appreciate any help you can give me on the subject. I need full links including the
http:// and everything.
View Replies
View Related
I wish to hide links, i'm at present trying to 'float' as such invisible links over a background image....
the line i'm wishin to use that i think is right is
#links a i {visibility: hidden;}
when taken out we can see the links, as needed, but the minute i add this line, they should be invisible but still there, this is the case in IE but with FF they disappear completely...
View Replies
View Related
I have a search box called r_name on the results page is requesting it
but if a person searched for a pub name then i'd like to page by pub name
if a person typed in a town then i'd like to page by rsTown
and if a person typed in a postcode i'd like to page by postycode something like:
Code:
IF r_name = rsTown THEN
Response.Write(" <a href=""search_results1.asp?<%rs="rsTown"%>& r_name & "&pageno=" & paging & """class=""textareatext"">" & paging+1 & "</a> ")
END IF
the above bit of code is incorrect?!
or
Code:
IF r_name = rsPubName THEN
Response.Write(" <a href=""search_results1.asp?rsPubname=" & r_name & "&pageno=" & paging & """class=""textareatext"">" & paging+1 & "</a> ")
View Replies
View Related
I'm trying to add a Next and Previous link on a detail page but i'm not sure how to go about it....
First page displays listings.
Second page displays main item.
Now what i'm trying to do is maintain a next and previous buttons so people don't have to go back to the display listings page
View Replies
View Related
Please refer to altavista by search the 'asp'.
First page:
[<< Prev] 1 2 3 4 5 6 7 8 9 10 [Next >>]
Second page:
[<< Prev] 1 2 3 4 5 6 7 8 9 10 [Next >>]
BUT, at the 10th page:
[<< Prev] 5 6 7 8 9 10 11 12 13 14 [Next >>]
How do make this kind of navigational links in asp?
View Replies
View Related
Is there an ASP command that can I use to make every occurance of a certain word into a link? For example, if I have an article about marketing, and I want every occurance of the word "marketing" to link to a page called marketing.htm, how would I do this using ASP
View Replies
View Related
I have a site where an affiliate program has been wreaking some havoc with their affiliate links, and has now been cancelled.
The site is hosted on windows and the files are .asp files.I need to be able to redirect the affiliate IDs to something safer, such as domain.com/ instead of domain.com/aff.php?id=1
View Replies
View Related
I have a db that users search to return records. However, I want them to see only 10 per page and then, a NEXT 10 link that will display the next 10 results.I have tried using LIMIT , but it only returns the specified number but no links or way for users to view them or the remaining the search results.
The search results is getting lengthy and users are beining to scroll, whine and complain.I am using Asp, MS SQL 7 on WINNT.
View Replies
View Related
I have created a header file that has some hyperlinks, I want to enable the hyperlinks depending on the situation for eg: the header has link1, link2, link3 and they correspond to page1, page2, page3. suppose I am on page1, I want to disable link1.... and so on.
View Replies
View Related
i have a small question for all that know asp, below i have a sample of code that ive noticed that is linked with other characters after the file type ".asp" what is this used for, and why?
if j = true then response.redirect "Default.asp?r=a1"
end if
how can i locate the file it is refering too or is it simply the standard "Default.asp" page and the characters after simply refer to part of the code located within. but still why is it used ?
View Replies
View Related
i need the code for parsing urls from text and changing them to <a> tags, for a forum .
View Replies
View Related
after reading the article on No-refesh links i was wondering if i could link to an asp page that will simply open a new window without changing the original window. i was wondering if there was a way using
<% Response.Status = "204 No Content" %>
and some script or something?
View Replies
View Related
I would like to know how to disable a link when a certain value is false. I have the following link.
<br><a href="OrderProgress.asp" class="blueLink">Check Order
Progress</a><br><br>
I wish to disable the link if blnValidCustomer = false and enable it otherwise.
View Replies
View Related