@@ -119,23 +119,7 @@ if ( $Config{ZM_OPT_UPLOAD} ) {
119
119
}
120
120
}
121
121
122
- if ( $Config{ZM_OPT_EMAIL} ) {
123
- if ( $Config{ZM_NEW_MAIL_MODULES} ) {
124
- require MIME::Lite;
125
- require Net::SMTP;
126
- } else {
127
- require MIME::Entity;
128
- }
129
- }
130
122
131
- if ( $Config{ZM_OPT_MESSAGE} ) {
132
- if ( $Config{ZM_NEW_MAIL_MODULES} ) {
133
- require MIME::Lite;
134
- require Net::SMTP;
135
- } else {
136
- require MIME::Entity;
137
- }
138
- }
139
123
140
124
$| = 1;
141
125
@@ -972,6 +956,8 @@ sub sendTheEmail {
972
956
973
957
eval {
974
958
if ($Config{ZM_NEW_MAIL_MODULES}) {
959
+ require MIME::Lite;
960
+ require Net::SMTP;
975
961
my $total_size = 0;
976
962
# Create the multipart container
977
963
my $mail = MIME::Lite->new(
@@ -1047,6 +1033,7 @@ sub sendTheEmail {
1047
1033
$mail->send();
1048
1034
}
1049
1035
} else {
1036
+ require MIME::Entity;
1050
1037
my $total_size = 0;
1051
1038
my $mail = MIME::Entity->build(
1052
1039
From => $Config{ZM_FROM_EMAIL},
@@ -1145,6 +1132,8 @@ sub sendMessage {
1145
1132
1146
1133
eval {
1147
1134
if ( $Config{ZM_NEW_MAIL_MODULES} ) {
1135
+ require MIME::Lite;
1136
+ require Net::SMTP;
1148
1137
### Create the multipart container
1149
1138
my $mail = MIME::Lite->new(
1150
1139
From => $Config{ZM_FROM_EMAIL},
@@ -1189,6 +1178,7 @@ sub sendMessage {
1189
1178
$mail->send(smtp=>$Config{ZM_EMAIL_HOST}, Timeout=>60);
1190
1179
}
1191
1180
} else {
1181
+ require MIME::Entity;
1192
1182
my $mail = MIME::Entity->build(
1193
1183
From => $Config{ZM_FROM_EMAIL},
1194
1184
To => $Config{ZM_MESSAGE_ADDRESS},
0 commit comments