6.4.3. Sending a picture as attachment of an email with 3G/GPRS Board
The function
sendFileto3Gemail
next:
•
SMTP server
•
SMTP port
•
STMP account
•
STMP password
•
Sender address
•
Sender name
•
Recipient address
•
Recipient name
•
Subject of the email
•
Body of the email
•
Picture name
Example of use:
{
// Sends PIC_0016.jpg from C:/Picture to an FTP server
_3G.sendFileto3Gemail("smtp.server.com", 995,
"smtp_user@mail.com", "smtp_password", "sender_addr@mail.com",
sender_name, "recipient_addr@mail.com", recipient_name,
"Email_subject", "Email_body", "PIC_0016.jpg");
}
The function returns:
•
'1' if success
•
'0' if error setting username and password
•
'-1' if error setting server and port
•
'-2' if error setting sender address and name
•
'-3' if error setting recipient address and name
•
'-4' if error setting subject
•
'-5' if error setting the body
•
'-6' if error attaching the file
•
'-7' if error sending the email
sends an email with a picture or a video attached. The parameters needed in order are the
-38-
Sending the photos and videos
v4.3
Need help?
Do you have a question about the Waspmote and is the answer not in the manual?