我在这里尝试过这个解决方案,但没有成功:Drupal获取站点范围的电子邮件地址?
以下是我的代码(位于page.tpl.php内):
<a href="mailto:<?php variable_get('site_mail', ini_get('sendmail_from')); ?>">My name</a>
Thanks.
You've just forgotten to print the variable to the page :)
<a href="mailto:<?php print variable_get('site_mail', ini_get('sendmail_from')); ?>">My name</a>