$welcome_mimetype = $conf->config('welcome_email-mimetype') || 'text/plain';
} else {
$welcome_template = '';
+ $welcome_from = '';
+ $welcome_subject = '';
+ $welcome_mimetype = '';
}
$smtpmachine = $conf->config('smtpmachine');
$radius_password = $conf->config('radius-password') || 'Password';
'svcnum' => $self->svcnum,
'job' => 'FS::svc_acct::send_email'
};
- warn "attempting to queue email to $to";
my $error = $wqueue->insert(
'to' => $to,
'from' => $welcome_from,
);
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
- return "queuing welcome email: $error";
+ return "error queuing welcome email: $error";
}
foreach my $jobnum ( @jobnums ) {
my $error = $wqueue->depend_insert($jobnum);
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
- return "queuing welcome email job dependancy: $error";
+ return "error queuing welcome email job dependancy: $error";
}
}
}
my $error = $self->ut_numbern('svcnum')
- || $self->ut_number('domsvc')
+ #|| $self->ut_number('domsvc')
+ || $self->ut_foreign_key('domsvc', 'svc_domain', 'svcnum' )
|| $self->ut_textn('sec_phrase')
;
return $error if $error;