fix: --from should take priority over --smtp.user if set
This commit is contained in:
2
main.go
2
main.go
@@ -82,8 +82,10 @@ var rootCmd = &cobra.Command{
|
|||||||
deliveryMethod = Resend
|
deliveryMethod = Resend
|
||||||
case smtpUsername != "" && smtpPassword != "":
|
case smtpUsername != "" && smtpPassword != "":
|
||||||
deliveryMethod = SMTP
|
deliveryMethod = SMTP
|
||||||
|
if from == "" {
|
||||||
from = smtpUsername
|
from = smtpUsername
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch deliveryMethod {
|
switch deliveryMethod {
|
||||||
case None:
|
case None:
|
||||||
|
|||||||
Reference in New Issue
Block a user