Changeset 5420:a2e8f6fab8d3
- Timestamp:
- 1969-12-31 16:00:00 (39 years ago)
- Author:
- Brendan Cully <brendan@…>
- Branch:
- HEAD
- Message:
-
Test that envelope from or from is set before attempting SMTP delivery.
Closes #3079.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r5283
|
r5420
|
|
| 211 | 211 | CONNECTION *conn; |
| 212 | 212 | ACCOUNT account; |
| | 213 | const char* envfrom; |
| | 214 | char buf[1024]; |
| 213 | 215 | int ret = -1; |
| 214 | | char buf[1024]; |
| | 216 | |
| | 217 | /* it might be better to synthesize an envelope from from user and host |
| | 218 | * but this condition is most likely arrived at accidentally */ |
| | 219 | if (EnvFrom) |
| | 220 | envfrom = EnvFrom->mailbox; |
| | 221 | else if (from) |
| | 222 | envfrom = from->mailbox; |
| | 223 | else |
| | 224 | { |
| | 225 | mutt_error (_("No from address given")); |
| | 226 | return -1; |
| | 227 | } |
| 215 | 228 | |
| 216 | 229 | if (smtp_fill_account (&account) < 0) |