Hylafax Mailing List Archives

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

[hylafax-users] smbfax and email - solution to DOMAIN+ - no need for aliases





After much hair pulling and googling i have finally solved the problem of
initial emails from smbfax and follow-up email notifications from hylafax.

* In both cases replace DOMAIN with your own :-)

1. Modify /usr/local/smbfax and replace the mail area with:

#################################################################################################
## Mail a user the URL to their fax document#


sub mail_user {

my ($user, $code) = @_;
   my $stripdomain;
   my $smtp = Net::SMTP->new($SMTP_HOST, Timeout => 60);
   $stripdomain = $user;
   $stripdomain =~ s/DOMAIN\+//g;
   open (OUT, ">/tmp/blah");
   print OUT "Sending email to $stripdomain$TRAILING_EMAIL\n";
   close OUT;

   $smtp->mail($stripdomain . $TRAILING_EMAIL);
   $smtp->to($stripdomain . $TRAILING_EMAIL);
   $smtp->data();
   $smtp->datasend("To: $stripdomain$TRAILING_EMAIL\n");
   $smtp->datasend("Subject:  $SUBJECT\n");
   $smtp->datasend("\n");
   $smtp->datasend("\nOpen the following $stripdomain web link to complete
your fax:\n\n");
   $smtp->datasend("$BASE_URL?ID=$code\n\n");
   $smtp->datasend("The server will keep this document available for ");
   $smtp->datasend($DEAD_TIME . " minutes.  After that, you will need to
re-");
   $smtp->datasend("submit it to fax it out.\n");
   $smtp->dataend();

   $smtp->quit();

}

#################################################################################################

2. Modify notify.awk.

At line 150 add the following above the print To statement.

 sub(/DOMAIN\+/,"",mailaddr);

That's it.


Thanks for all everyone's help and patience, and of course to all who
assisted in the creation of such excellent software!


Cheers,


Stuart



____________________ HylaFAX(tm) Users Mailing List _______________________
  To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
 On UNIX: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null
  *To learn about commercial HylaFAX(tm) support, mail sales@hylafax.org.*



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services