Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert Hyperlink into e-mail

Status
Not open for further replies.

redzombi19

Programmer
Jun 2, 2002
35
0
0
US
is there a way to insert a hyperlink into a email other than just typing in the url programaticly, for example:
click HERE to track your order
instead of
click here: to track your order

thanks!
 
sorry, guess i wasnt as clear as i needed to be,:0)
the question i was tring to ask was is there a way in code (VFP) to generate a hyperlink, i am already sending emails i just wanted to add a hyperlink through foxpro.
thanks!
 
redzombi19

Can you be more specific? Where will the email address end up? Where do you want to generate it from? The reason I ask, not so long ago, we had some very valued help from this forum about a similar thing we had problems with.

Give us some info....
Lee

Alone we can do so little, together we can do so much
 
ok heres my idea,
i have a program that runs at night via windows scheduler it goes throuh a list of customers and generates emails to those who want it about there order info, totals, number of orders ect.
the thing id like to intagrate into the email is a straight link to there tracking number if the order has been shipped.
which would be easy enough with just a url but that looks tacky, and does not allways work well in email clients like outlook express
because if the url is too long it wraps it and only the first line of the url will act like the link.
so if i could in code somehow make the word "Click Here" point to the url (just like you can manualy do in outlook express)
then that would be great.
thanks again!
 
Put it in just like you would in a web page. But, if the person that you send the email to does not have their email application setup to received HTML, it will appear as plain text and the link won't work.

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports"
 
craigber,
i have already tried that in outlook express, just typing in somthing like:
<a href=&quot; Here</a>
but it wont just show &quot;Click Here&quot;
it shows the whole thing, and i am sending and reading in html.
so im guessing that there must be something special you have to do that im obvously not doing!
thanks!
 
im thinking that mabey it could have something to do with mime?
 
Hi redzombi19

I have an application which has a similar requirement as for sending emails to a list or customers based on a condition. I am stuck on the actual emailing part. could you please guide me as to how you are doing it? sorry if I am in the wrong forum.

Thanks & Regards

Ravi
 
vdeveloper

sorry if I am in the wrong forum.

If you are using VFP your are not in the wrong forum, but in the wrong thread. &quot;One question - one thread&quot;. Start your own thread with your question and explain a little more what part of the process your are have trouble with and what you are trying to achieve.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
redzombi19 ,

I've looked at this for around an hour now...I'm not sure how you would go about doing this... hyperlinks will automatically show up fine, say if you are using ShellExecute to do this, but as soon as you try and use that anchor tag you end up with it not being formatted properly and it is all treated as text...except for the URL which is of course formatted as a hyperlink. Weird, you would think that there would be a way to do this.

Slighthaze = NULL
[sub]craig1442@mchsi.com[/sub][sup]
&quot;Whom computers would destroy, they must first drive mad.&quot; - Anon​
[/sup]
 
A quick question...are you looking for this to work with a broad range of email clients that your users may have installed or are you trying to get this done using Outlook and/or OE specifically? The reason I ask is this is probably very simply accomplished using automation if you are restricting this to Microsoft's email clients.

Slighthaze = NULL
[sub]craig1442@mchsi.com[/sub][sup]
&quot;Whom computers would destroy, they must first drive mad.&quot; - Anon​
[/sup]
 
Try this code (inspired from one of ramani's faqs):

o=createobject(&quot;outlook.application&quot;)
oitem=o.createitem(0)
oitem.subject=&quot;Hyperlink test&quot;

oitem.to=&quot;destination@far_away.com&quot;
** To send copy to addresses..

oItem.htmlbody='<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;>'
oitem.htmlbody=oItem.body+'<HTML><HEAD><TITLE></TITLE>'+CHR(13)
oitem.htmlbody=oItem.body+'<META http-equiv=Content-Type content=&quot;text/html; charset=iso-8859-2&quot;>'+CHR(13)
oitem.htmlbody=oItem.body+'<META content=&quot;MSHTML 6.00.2600.0&quot; name=GENERATOR>'+CHR(13)
oitem.htmlbody=oItem.body+'<STYLE></STYLE>'+CHR(13)
oitem.htmlbody=oItem.body+'</HEAD>'+CHR(13)
oitem.htmlbody=oItem.body+'<BODY>'+CHR(13)
oitem.htmlbody=oItem.body+'<P>click&nbsp;<FONT size=2><A href=&quot; </FONT></P></BODY></HTML>'+CHR(13)

oitem.send
o=.null.

In my opinion, you have to create the message in outlook, view its source and modify it accordingly (in this case I changed &quot; to &quot;here!&quot;).
HTH
Good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top