Ver Mensaje Individual
  #3 (permalink)  
Antiguo 07/09/2011, 11:11
pacoman
 
Fecha de Ingreso: septiembre-2011
Mensajes: 22
Antigüedad: 12 años, 8 meses
Puntos: 1
Respuesta: Problemas con DLL en C++

PARTE 2

Código C++:
Ver original
  1. NoMangle int DLL_IMPORT_EXPORT seeSmtpConnectSSL(int,int,char *,char *,char *,char *);
  2. NoMangle int DLL_IMPORT_EXPORT seePop3ConnectSSL(int,int,char *,char *);                
  3. NoMangle int DLL_IMPORT_EXPORT seeIsConnected(int);
  4.  
  5.  
  6. int main(int argc, char *argv )
  7. {int Code;
  8. // attach SEE library
  9. Code = seeAttach(1, 0); // evaluation keycode is 0
  10. if(Code<0)
  11. {printf("Cannot attach SEE\n");
  12. exit(1);
  13. }
  14. // connect to SMTP mail server
  15. Code = seeSmtpConnect(
  16. 0, // channel 0
  17. (char *)"smtp.live.com:587", // your SMTP server
  18. (char *)"<[email protected]>", // your email address
  19. (char *)"<[email protected]>"); // Reply-To header
  20. if(Code<0)
  21. {printf("Connect failed\n");
  22. seeRelease();
  23. exit(1);
  24. }
  25. // send email
  26. Code = seeSendEmail(
  27. 0, // channel 0
  28. (char *)"<[email protected]>", // To list
  29. (char *)NULL, // CC list
  30. (char *)NULL, // BCC list
  31. (char *)"SEE Test", // Subject
  32. (char *)"This is a test.", // Message text
  33. (char *)NULL); // MIME attachment
  34. if(Code<0) printf("email NOT sent\n");
  35. // close connection to server
  36. seeClose(0);
  37. seeRelease();
  38. }

Última edición por RootK; 07/09/2011 a las 15:34 Razón: solicitud usuario