Helpful Docs to read before posting: (All Docs) | Config Docs | General FAQ | Mailing List Sending FAQ | Error FAQ

Can't assign an external template

What else do you want to hook Dada Mail to?

Re: Can't assign an external template

Postby justin » Sat Jul 14, 2012 12:51 pm

Good question - let's see -

As of at least v5.1.1, most all the browser user agent stuff is in one subroutine in DADA/App/Guts.pm - looks like this:

Code: Select all
sub grab_url {
   my $url = shift;
   eval { require LWP::Simple };
   if($@){
      carp "LWP::Simple not installed! $!";
      return undef;
   }else{
      eval { $LWP::Simple::ua->agent('Mozilla/5.0 (compatible; ' . $DADA::CONFIG::PROGRAM_NAME . ')'); };
      my $tmp = undef;
         $tmp = LWP::Simple::get($url);
         $tmp = safely_decode($tmp);
         return $tmp;
   }
}



So, you can just change that string,

Code: Select all
Mozilla/5.0 (compatible; ' . $DADA::CONFIG::PROGRAM_NAME . ')


To whatever you'd like.

It's possible the Send a Webpage stuff is different.
User avatar
justin
 
Posts: 4583
Joined: Wed Feb 13, 2008 8:41 pm
Location: Denver, CO

Re: Can't assign an external template

Postby JohnA » Sun Jul 15, 2012 4:31 am

Thanks for that.

I ended up having to stick DadaMail in an iframe because of session / cookie issues with the system I was trying to integrate into, but this is handy to know for future reference :)
JohnA
 
Posts: 35
Joined: Wed May 26, 2010 11:36 am

Previous

Return to Other! Integration

Who is online

Users browsing this forum: No registered users and 1 guest

Loading