🐛 — Use To header for sending mails — Fix #278
This commit is contained in:
		
							parent
							
								
									30dc4de99e
								
							
						
					
					
						commit
						ad4e942556
					
				| 
						 | 
					@ -75,6 +75,8 @@ sub send_mail {
 | 
				
			||||||
    for my $email (@a) {
 | 
					    for my $email (@a) {
 | 
				
			||||||
        if (!Email::Valid->address($email)) {
 | 
					        if (!Email::Valid->address($email)) {
 | 
				
			||||||
            push @bad, $email;
 | 
					            push @bad, $email;
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            push @good, $email;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -99,12 +101,14 @@ sub send_mail {
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    $c->mail(
 | 
					    for my $email (@good) {
 | 
				
			||||||
        from    => $c->config('mail_sender'),
 | 
					        $c->mail(
 | 
				
			||||||
        bcc     => $emails,
 | 
					            from    => $c->config('mail_sender'),
 | 
				
			||||||
        subject => $subject,
 | 
					            to      => $emails,
 | 
				
			||||||
        data    => $body
 | 
					            subject => $subject,
 | 
				
			||||||
    );
 | 
					            data    => $body
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return $c->render(
 | 
					    return $c->render(
 | 
				
			||||||
        template    => 'msg',
 | 
					        template    => 'msg',
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue