Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Validation email and html

Quote Reply
Validation email and html
Hi,

Can the validation email be in html form and the template have:

<%Links::Utils::load_link%>

so that the same gets emailed to the Link Owner when th Link is validated. Same query for the Modification Of Links Validation Email Also?

TIA
Anup
Quote Reply
Re: [anup123] Validation email and html In reply to
The Add/Modify When Validated by Admin and the email template has

<%Links::Utils::load_link%>

It's all html code which is sent to the link owner. How could the same be sent as html mail. The above works fine with recommend.

Any Clue/Help Plz.

TIA
Anup
Quote Reply
Re: [anup123] Validation email and html In reply to
Hi. You could try looking in /Links/User/Add.pm and Modify.pm, and find the bit that looks like;

Code:
GT::Mail->send (
smtp => $CFG->{db_smtp_server},
sendmail => $CFG->{db_mail_path},
from => $from,
subject => $subject,
to => $to,
msg => $msg,
debug => $Links::DEBUG
) or die "Unable to send mail: $GT::Mail::error";

...and change it to look something like;

Code:
GT::Mail->send (
smtp => $CFG->{db_smtp_server},
sendmail => $CFG->{db_mail_path},
from => $from,
subject => $subject,
to => $to,
msg => $msg,
type => 'text/html',
debug => $Links::DEBUG
) or die "Unable to send mail: $GT::Mail::error";

Basically, you should just need to add the line in red. This will then make the email notifications go out in HTML format Smile

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Validation email and html In reply to
Hi Andy.

Despite having the changes done and restarting httpd before validating the modification, the mail recd is still html code and the header still shows

Content-Type: text/plain

So it did not work. Any other modification needed?

Thanks
Anup
Quote Reply
Re: [anup123] Validation email and html In reply to
Mmm.. which email are you trying to send? email-val.txt?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Validation email and html In reply to
Tried the change with email_mod.txt
If that works then would also change in email_add.txt

Thanks
Anup
Quote Reply
Re: [anup123] Validation email and html In reply to
Has anyone been able to get this to work in the latest version of Links SQL, it seems it shouldn't be so hard to get the system to send HTML formatted email.
Quote Reply
Re: [Stephan99] Validation email and html In reply to
Hi. It should still work in 2.2.x +

Basically, just look in the /admin/Links/User/*.pm files (i.e Add.pm, Modify.pm, etc) ... and find references to GT::Mail.

Once you have found them, you need to add this line in;

type => 'text/html',

This will tell GT::Mail that you want to send out emails in HTML form ... and all the headers should be sorted out for you automatically Smile

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Validation email and html In reply to
Did that, it didn't work
Quote Reply
Re: [Stephan99] Validation email and html In reply to
For prosperity... its tools.pm that needs to be edited with the same instructions as above... Thanks Jack for the AWESOME tech support!
Quote Reply
Re: [Stephan99] Validation email and html In reply to
It would get overwritten with version upgrade. I was expecting the same to be incorporated in the regular product release. Waiting for it to come through as keeping track of code changes is really not that easy.

There are also issues with repect to mailings and SpamAssassin which whenever incroporated would perhaps need updates on thrid party plugins dealing with mailings. Hope this makes it's way into the next release.

HyTC

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [HyperTherm] Validation email and html In reply to
Yes, this really should be added to the setup menu for mail.

If anyone is watching this thread :o)
Quote Reply
Re: [anup123] Validation email and html In reply to
Has the issue of being able to send HTML mails addressed in glinks3? With css there yes

<%Links::Utils::load_link%>

would not longer work, but can html mails be sent for link validation? This is wrt link_added.eml and link_modified.eml




Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [HyperTherm] Validation email and html In reply to
In Gossamer Links 3.x, the notification e-mails are all saved in .eml format which is a whole e-mail rather than just the body of the e-mail. That means with the correct headers, you can format the e-mail however you want.

PS: Links::Utils::load_link has been deprecated in favour of doing <%Links::Utils::load_link_info%><%include link.html%>

Adrian
Quote Reply
Re: [brewt] Validation email and html In reply to
Thanks.
Coz of css,
<%Links::Utils::load_link_info%>
<%include link.html%>

added anywhere in templates for sending mails would not work wrt all the formatting. Say for Recommend_It plugin, or even tha validation emails. I checked sending it to hotmail/yahoo/gmail/gossamer-mail accounts using the above but all styles lost at recepients end (as each of them must be using their own css on mail interface).




Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [brewt] Validation email and html In reply to
I am trying to format the emails in html. However, even though I am including the html tags it is not displaying as html, rather as a plain text email.

This is the code I am using:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http: //www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
in the extra headers,

and:
Code:
<html>
<head>
<title><%site_title%></title>
<%include include_common_head.html%>
</head>
<body>
<div id="logo"><h1><a href="http://www.globalyeshiva.com"><%site_title%></a></h1></div>
</div>

default link_added.eml text

</body>
</html>
What is wrong with the above? Or is it just not possible to format the emails in html?

Thanks!


Gila
The Global Yeshiva
Quote Reply
Re: [Gila] Validation email and html In reply to
By headers, I mean e-mail headers. So for a very basic html e-mail, this means adding a Content-Type: text/html header.

Adrian