Skip Menu |

This queue is for tickets about the AnyEvent-SMTP CPAN distribution.

Report information
The Basics
Id: 72048
Status: resolved
Priority: 0/
Queue: AnyEvent-SMTP

People
Owner: Nobody in particular
Requestors: dynot [...] JUNKMAIL.ATH.CX
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.06
Fixed in: 0.08



Subject: Associate host:port with email that it sent
Thank you for your responses and fixes. Is it possible to see the sending server's host and port at the mail received event? Or somehow somewhere access the host:port together with the email it sent? $server->reg_cb( mail => sub { #### but what host sent this mail? #### my ($s,$mail) = @_; warn "Received mail from $mail->{from} to $mail->{to}\n$mail- Show quoted text
>{data}\n";
}, ); Thanks in advance.
From: dynot [...] JUNKMAIL.ATH.CX
I was able to accomplish this by sending the host as a parameter to the mail event at the end of the DATA callback in AnyEvent::SMTP::Server::new : $s->event( mail => delete $con->{m}, $con->{host} ); This way I can see the sending host together with the email: $server->reg_cb( mail => sub { print "Received mail from $_[1]->{from} to @{$_[1]-> {to}}, host: $_[2]\n";
From: dynot [...] JUNKMAIL.ATH.CX
I see this is already implemented in 0.08, thank you.