version 1.1.1.1, 2012/02/21 16:52:55
|
version 1.1.1.1.2.1, 2013/07/22 00:39:41
|
Line 542 add_recipient( char* recipient, int len )
|
Line 542 add_recipient( char* recipient, int len )
|
} |
} |
|
|
/* Strip off any angle brackets. */ |
/* Strip off any angle brackets. */ |
/* |
|
while ( len > 0 && *recipient == '<' ) |
while ( len > 0 && *recipient == '<' ) |
{ |
{ |
++recipient; |
++recipient; |
Line 552 add_recipient( char* recipient, int len )
|
Line 551 add_recipient( char* recipient, int len )
|
--len; |
--len; |
|
|
(void) snprintf( buf, sizeof(buf), "RCPT TO:<%.*s>", len, recipient ); |
(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 ); |
send_command( buf ); |
status = read_response(); |
status = read_response(); |
if ( status != 250 && status != 251 ) |
if ( status != 250 && status != 251 ) |