mirror of
https://github.com/netbirdio/FreeBSD-ports.git
synced 2026-05-22 18:42:42 -07:00
Allow to specify To: field in Full Name <email> format.
PR: 128540 Submitted by: Helmut Schneider <jumper99@gmx.de>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= mini_sendmail
|
||||
PORTVERSION= 1.3.6
|
||||
PORTREVISION= 1
|
||||
CATEGORIES+= mail
|
||||
MASTER_SITES= http://www.acme.com/software/mini_sendmail/
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
--- mini_sendmail.c.orig 2005-06-29 19:37:15.000000000 +0200
|
||||
+++ mini_sendmail.c 2008-11-02 17:09:53.000000000 +0100
|
||||
@@ -542,6 +542,7 @@
|
||||
}
|
||||
|
||||
/* Strip off any angle brackets. */
|
||||
+/*
|
||||
while ( len > 0 && *recipient == '<' )
|
||||
{
|
||||
++recipient;
|
||||
@@ -551,6 +552,23 @@
|
||||
--len;
|
||||
|
||||
(void) snprintf( buf, sizeof(buf), "RCPT TO:<%.*s>", len, recipient );
|
||||
+*/
|
||||
+ if (len > 0 && recipient[len-1] == '>' )
|
||||
+ {
|
||||
+ /* "<name@domain>" or: "Full Name <name@domain>" */
|
||||
+ while (len > 0 && *recipient != '<' )
|
||||
+ {
|
||||
+ ++recipient;
|
||||
+ --len;
|
||||
+ }
|
||||
+ (void) snprintf( buf, sizeof(buf), "RCPT TO:%.*s", len, recipient );
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* name@domain */
|
||||
+ (void) snprintf( buf, sizeof(buf), "RCPT TO:<%.*s>", len, recipient );
|
||||
+ }
|
||||
+
|
||||
send_command( buf );
|
||||
status = read_response();
|
||||
if ( status != 250 && status != 251 )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user