hello I’m using the sample of DCRAbbits10.66 smtp with rcm5700 and I would like sent an email from hotmail by rabbit I did not know how to configure smtp verbose. thank you for your help
c code:
/*******************************************************************************
smtp.c
Rabbit Semiconductor, 2000
A small program that uses the SMTP library
to send an e-mail.
*******************************************************************************/
#class auto
/***********************************
- Configuration *
- ------------- *
- All fields in this section must *
- be altered to match your local *
- network settings. *
***********************************/
/*
- NETWORK CONFIGURATION
- Please see the function help (Ctrl-H) on TCPCONFIG for instructions on
- compile-time network configuration.
*/
#define TCPCONFIG 1
#define _PRIMARY_STATIC_IP “172.18.24.51”
#define _PRIMARY_NETMASK “255.255.252.00”
#define MY_GATEWAY “0.0.0.0”
#define MY_NAMESERVER “0.0.0.0”
#define SUBJECT “salut beau gosse!”
#define BODY "sa marche !.
"
“t’es t’es trop fort!”
#define SMTP_FROM “rem--s@hotmail.fr”
#define SMTP_TO “rem--s@hotmail.fr”
//#define SMTP_SERVER “10.10.6.1”
#define SMTP_SERVER “smtp.live.com”
#define SMTP_PORT 25
#define SMTP_DOMAIN “hotmail.fr”
#define SMTP_VERBOSE
#define USE_SMTP_AUTH
#define SMTP_AUTH_USER “yop@mail.com”
#define SMTP_AUTH_PASS “*************”
#define SMTP_AUTH_FAIL_IF_NO_AUTH
/********************************
- End of configuration section *
********************************/
#ifndef SMTP_SERVER
#error “You must define SMTP_SERVER to your server’s IP or hostname.”
#endif
#ifndef SMTP_FROM
#error “You must define SMTP_FROM to a valid email address.”
#endif
#ifndef SMTP_TO
#error “You must define SMTP_TO to your email address.”
#endif
#memmap xmem
#use dcrtcp.lib
#use smtp.lib
void main()
{
// Start network and wait for interface to come up (or error exit).
sock_init_or_exit(1);
#ifdef USE_SMTP_AUTH
smtp_setauth (SMTP_AUTH_USER, SMTP_AUTH_PASS);
#endif
smtp_sendmail(SMTP_TO, SMTP_FROM, SUBJECT, BODY);
while(smtp_mailtick()==SMTP_PENDING)
continue;
if(smtp_status()==SMTP_SUCCESS)
printf("Message sent
");
else
printf("Error sending message
");
}