mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-10-04 22:46:49 +02:00
fix smtp should use implicit tls on 465 insteadof starttls
Signed-off-by: RonniSkansing <rskansing@gmail.com>
This commit is contained in:
3 files changed
+31
No files matched your search
@@ -3112,6 +3112,12 @@ func (c *Campaign) sendCampaignMessages(
|
||||
},
|
||||
),
|
||||
}
|
||||
// port 465 speaks implicit TLS (SMTPS): the connection is wrapped in
|
||||
// TLS on connect instead of being upgraded later via STARTTLS. go-mail
|
||||
// ignores the TLS policy while SSL is on.
|
||||
if smtpPort.Int() == 465 {
|
||||
emailOptions = append(emailOptions, mail.WithSSL())
|
||||
}
|
||||
// use a custom HELO/EHLO hostname when set, otherwise go-mail
|
||||
// falls back to the machine hostname
|
||||
if helo, err := smtpConfig.Helo.Get(); err == nil {
|
||||
@@ -5563,6 +5569,13 @@ func (c *Campaign) sendSingleEmailSMTP(
|
||||
),
|
||||
}
|
||||
|
||||
// port 465 speaks implicit TLS (SMTPS): the connection is wrapped in
|
||||
// TLS on connect instead of being upgraded later via STARTTLS. go-mail
|
||||
// ignores the TLS policy while SSL is on.
|
||||
if smtpPort.Int() == 465 {
|
||||
emailOptions = append(emailOptions, mail.WithSSL())
|
||||
}
|
||||
|
||||
// use a custom HELO/EHLO hostname when set, otherwise go-mail
|
||||
// falls back to the machine hostname
|
||||
if helo, err := smtpConfig.Helo.Get(); err == nil {
|
||||
|
||||
@@ -532,6 +532,12 @@ func (m *Email) SendTestEmail(
|
||||
},
|
||||
),
|
||||
}
|
||||
// port 465 speaks implicit TLS (SMTPS): the connection is wrapped in
|
||||
// TLS on connect instead of being upgraded later via STARTTLS. go-mail
|
||||
// ignores the TLS policy while SSL is on.
|
||||
if smtpPort.Int() == 465 {
|
||||
emailOptions = append(emailOptions, mail.WithSSL())
|
||||
}
|
||||
// use a custom HELO/EHLO hostname when set, otherwise go-mail
|
||||
// falls back to the machine hostname
|
||||
if helo, err := smtp.Helo.Get(); err == nil {
|
||||
|
||||
@@ -244,6 +244,12 @@ func (s *SMTPConfiguration) SendTestEmail(
|
||||
},
|
||||
),
|
||||
}
|
||||
// port 465 speaks implicit TLS (SMTPS): the connection is wrapped in
|
||||
// TLS on connect instead of being upgraded later via STARTTLS. go-mail
|
||||
// ignores the TLS policy while SSL is on.
|
||||
if smtpPort.Int() == 465 {
|
||||
emailOptions = append(emailOptions, mail.WithSSL())
|
||||
}
|
||||
// use a custom HELO/EHLO hostname when set, otherwise go-mail
|
||||
// falls back to the machine hostname
|
||||
if helo, err := smtpConfig.Helo.Get(); err == nil {
|
||||
@@ -668,6 +674,12 @@ func (s *SMTPConfiguration) SendMessages(
|
||||
},
|
||||
),
|
||||
}
|
||||
// port 465 speaks implicit TLS (SMTPS): the connection is wrapped in
|
||||
// TLS on connect instead of being upgraded later via STARTTLS. go-mail
|
||||
// ignores the TLS policy while SSL is on.
|
||||
if smtpPort.Int() == 465 {
|
||||
emailOptions = append(emailOptions, mail.WithSSL())
|
||||
}
|
||||
// use a custom HELO/EHLO hostname when set, otherwise go-mail
|
||||
// falls back to the machine hostname
|
||||
if helo, err := smtpConfig.Helo.Get(); err == nil {
|
||||
|
||||
Reference in new issue
Block a user