10-13-2010 08:16 PM
Hello,
I have a problem using InetSendMail (SMTP sever, From_Email, To_Email, Subject, Message, attachment) function.
If I directly use a string in To_Email position as "xxxx@xxx.xxx" then the functions works well and I can send emails.
However, if I use,
char To_Email[30] ="xxxx@xxx.xxx"; and use InetSendMail(..) function with To_Email (e.g. InetSendMail(..,.., To_Email,..,..), then I always got an error -7.
Can anyone give me a advice?
Thank you.
Solved! Go to Solution.
10-14-2010 06:06 PM
Try declaring it as:
const char* To_Email = "xxxx@xxxx.xxxx";
Let me know if that makes a difference in your code.
10-14-2010 07:30 PM
It works.
Thank you.