email snip error

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
AtMa_1632481
Level 1
Level 1
5 likes given First like given Welcome!

Hi Gentlemen,

I made a project from email snip. Unfortunately it doesn’t work. I’ve tried with the BCM943907AEVAL1F board what I used in the WICED101 training. Unfortunately I couldn’t find any info on the community. The last question with the same problem was in 2013.

Made a little debug and it seems the error happens in ‘smtp.c’ file line:

VERIFY(SMTP_MORE_INFO, get_smtp_reply_code(&account->internal->smtp_socket, packet));

In the wiced_smtp_send function.

I inserted WPRINT_APP_INFO function after all possible error place:

WPRINT_APP_INFO(( "verifying smtp_socket\n" ));

VERIFY(WICED_SUCCESS, send_smtp_command(&account->internal->smtp_socket, buffer, (uint8_t) buffer_length, NULL, 0));

WPRINT_APP_INFO(( "send_smtp_command\n" ));

VERIFY(WICED_SUCCESS, receive_smtp_reply(&account->internal->smtp_socket, &packet, &reply, &length));

WPRINT_APP_INFO(( "receive_smtp_reply\n" ));

VERIFY(SMTP_MORE_INFO, get_smtp_reply_code(&account->internal->smtp_socket, packet));

// ! ! here the return value from get_smtp_reply_code  is 501 instead of 334 that is why goes to exit

WPRINT_APP_INFO(( "get_smtp_reply_code\n" ));

.

.

.

My serial output is looks like this:

verifying smtp_socket

send_smtp_command

receive_smtp_reply

FAILED!

The last line came from email.c file send_email function:

if ( wiced_smtp_send( &account, &email ) == WICED_SUCCESS )

{

WPRINT_APP_INFO(( "success!\n" ));

}

else

{

WPRINT_APP_INFO(( "%x FAILED!\n" ));

}

So I don’t know what is the problem. I only made a gmail , and filled the necessary data in the code.

  Could you help me please?

Many thanks in advance!

Have a nice day!

0 Likes
1 Solution
RaktimR_11
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

Hello Attila,

Thanks for bringing this to our notice. I am using SDK 6.0 to test the email snip. The error might have occurred because of the incorrect permission settings in the mail id by default used to send the email; i.e. wiced.test@gmail.com. If you modify the account details to your own mail id in the 154-156 lines of the snip, the application works just fine.  One more thing, in your Gmail account settings, you have to enable sign in for less secure apps which is by default not enabled.

pastedImage_2.png

InkedScreenshot_20171110-142050_LI.jpg

Let us know if you face any difficulty.

View solution in original post

2 Replies
RaktimR_11
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

Hello Attila,

Thanks for bringing this to our notice. I am using SDK 6.0 to test the email snip. The error might have occurred because of the incorrect permission settings in the mail id by default used to send the email; i.e. wiced.test@gmail.com. If you modify the account details to your own mail id in the 154-156 lines of the snip, the application works just fine.  One more thing, in your Gmail account settings, you have to enable sign in for less secure apps which is by default not enabled.

pastedImage_2.png

InkedScreenshot_20171110-142050_LI.jpg

Let us know if you face any difficulty.

Hi rroy,

Thanks a lot! The less secure devises was the problem. I didn't knew that. I just created a new gmail box and thought its enough...

Thanks again,

Have a nice day!

0 Likes