FILE * email_user_open( ClassAd *jobAd, const char *subject ) { int cluster = 0, proc = 0; jobAd->LookupInteger( ATTR_CLUSTER_ID, cluster ); jobAd->LookupInteger( ATTR_PROC_ID, proc ); return email_user_open_id( jobAd, cluster, proc, subject ); }
FILE* Email::open_stream( ClassAd* ad, int exit_reason, const char* subject ) { if( ! shouldSend(ad, exit_reason) ) { // nothing to do return NULL; } ad->LookupInteger( ATTR_CLUSTER_ID, cluster ); ad->LookupInteger( ATTR_PROC_ID, proc ); MyString full_subject; full_subject.formatstr( "Condor Job %d.%d", cluster, proc ); if( subject ) { full_subject += " "; full_subject += subject; } if(email_admin) { fp = email_admin_open( full_subject.Value() ); } else { fp = email_user_open_id( ad, cluster, proc, full_subject.Value() ); } return fp; }