3

My first post on the forum, I'm trying to create a mailto: that goes through to email addresses from a data extension.

I've tried - href="mailto:%%=v(@consultantemailaddress)=%%" - but this unsurprisingly doesn't work.

I've tried concat also - %%=RedirectTo(Concat(mailto:%%v=(@consultantemailaddress)=%%))=%% - again no luck and shows this error at the back end:

ExactTarget.OMM.InvalidFunctionException: The function call uses an unrecognized function name.

"Function Name: mailto:%%=v Function Call: mailto:%%=v(@consultantemailaddress) Error Code: OMM_FUNC_INVALID - from OMMCommon"

So after speaking to support I tried printing mailto as a variable but again no luck,


%%[

VAR @Cemailaddress, @mailto

SET @consultantemailaddress = Lookup("DE_CDetails", "CEmailAddress", "CID", @cID)

SET @mailto = "Mailto:"

]%%

<a name="c-repemail" href="%%=RedirectTo(Concat("@mailto","@cemailaddress"))=%%">link</a> 

If anyone could point me the right direction with this it would be great, what is the best way to concat variables/links?

1
  • Not sure if this will help, but you need to remove the quotes on mailto and cemailaddress. (perhaps stackex forced this on you) Also, make sure that you altenate using single ' and double " . That will also eliminate some possible pitfalls.
    – Timothy
    Commented Oct 27, 2014 at 16:55

1 Answer 1

3

I would say , You can use RedirectTo() for URL links only and not for mailto. The first attempt you tried should work.

if you trying to use mailto that activates the default mail client on the computer for sending an e-mail.the first attempt should work for ya ..

Example: <a href="mailto:%%=v(@cemailaddress)=%%"><b>Here's the email: %%=v(@cemailaddress)=%%</b></a>

2
  • 2
    I would recommend to confirm that you are indeed getting the data from DE. Try printing out the fields without embedding them into the hyperlinks first and see if all the details are in place. You definitely don't need a RedirectTo call.
    – Vlad
    Commented Oct 26, 2014 at 21:46
  • Hi guys, really appreciate the input, after reading the comments we found that <a href="mailto:%%=RedirectTo(@cemailaddress)=%%">%%=(@cemailaddress)=%%</a> Seems to be working, Thanks again! Commented Oct 27, 2014 at 19:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .