views:

783

answers:

2

Does anyone know how to use the l() or url() function to create mailto links?

I am running drupal 6.

+3  A: 

You need to use the absolute option:

l('Mail me', 'mailto:[email protected]', array(absolute => TRUE));

generates

<a href="mailto:[email protected]>Mail Me</a>
googletorp
A: 
url('mailto:' . 'email address')  
l('email text', 'mailto:' . 'email address')
najmeddine