Logo Search packages:      
Sourcecode: nbsmtp version File versions  Download package

ssize_t smtp_write ( servinfo_t serverinfo,
char *  str 
)

Calls fd_puts appending CR LF.

Parameters:
[in] serverinfo A pointer to a servinfo_t struct with the socket information
[in] str A pointer to the string to be written
Returns:
We return what fd_puts returns
See also:
fd_puts()

Definition at line 48 of file smtp.c.

References fd_puts(), and log_msg().

Referenced by nbsmtp_auth(), nbsmtp_data(), nbsmtp_ehlo(), nbsmtp_header(), nbsmtp_helo(), nbsmtp_rcpts(), and send_mail().

{
      char *buf;
      ssize_t ret;

      asprintf(&buf,"%s\r\n",str);

      ret = fd_puts(serverinfo,buf,strlen(buf));
      log_msg(LOG_DEBUG,"[->] %s",buf);
      free(buf);

      return ret;
}


Generated by  Doxygen 1.6.0   Back to index