Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Notice: Undefined variable: filetype in SmtpMailSystem->mail() (line 413 of /home . . .
I get this error when I attach a file and send. The file does send though. Is this a bug in this module?
Comment | File | Size | Author |
---|---|---|---|
#4 | smtp-undefined-variable-filetype-1816092-4.patch | 636 bytes | Tor Arne Thune |
Comments
Comment #1
Tor Arne Thune CreditAttribution: Tor Arne Thune commentedThis is a bug in the SMTP module.
From
SmtpMailSystem::mail()
:As you can see, $mailer->AddAttachment() is given a non-existing variable ($filetype) as an argument. It should be $file_type, as this variable is defined above. Moving to the SMTP module issue queue.
Comment #2
royerd CreditAttribution: royerd commentedThank you!
Comment #3
royerd CreditAttribution: royerd commentedYes, indeed. That fixes it. If that variable $filetype is changed to $file_type in smtp.mail.inc on line 413, the error goes away. Good catch. Perhaps this can be changed for the next dev version?
Comment #4
Tor Arne Thune CreditAttribution: Tor Arne Thune commentedHere's a patch against 7.x-1.x for the committer.
Comment #5
wundo CreditAttribution: wundo commentedThanks, committed.