source: packages/net/mini_sendmail/patches/200-fullname.patch @ 6919

Last change on this file since 6919 was 6919, checked in by florian, 10 years ago

Fix full name support, thanks zandbelt (#1578)

File size: 943 bytes
  • mini_sendmail-1.3.5

    old new  
    539539        } 
    540540 
    541541    /* Strip off any angle brackets. */ 
     542/* 
    542543    while ( len > 0 && *recipient == '<' ) 
    543544        { 
    544545        ++recipient; 
     
    548549        --len; 
    549550 
    550551    (void) snprintf( buf, sizeof(buf), "RCPT TO:<%.*s>", len, recipient ); 
     552*/ 
     553    if (len > 0 && recipient[len-1] == '>' ) 
     554    { 
     555        /* "<name@domain>" or: "Full Name <name@domain>" */ 
     556        while (len > 0 && *recipient != '<' ) 
     557            { 
     558            ++recipient; 
     559            --len; 
     560            } 
     561        (void) snprintf( buf, sizeof(buf), "RCPT TO:%.*s", len, recipient ); 
     562    } 
     563    else 
     564    { 
     565        /* name@domain */ 
     566        (void) snprintf( buf, sizeof(buf), "RCPT TO:<%.*s>", len, recipient ); 
     567    } 
     568              
    551569    send_command( buf ); 
    552570    status = read_response(); 
    553571    if ( status != 250  && status != 251 ) 
Note: See TracBrowser for help on using the repository browser.