• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

'SMTP_Result {aka struct esp_mail_smtp_send_status_t}' has no member named 'timesstamp'

Q&A Forum › Category: ESP32 › 'SMTP_Result {aka struct esp_mail_smtp_send_status_t}' has no member named 'timesstamp'
0 Vote Up Vote Down
vincent lawrence asked 4 years ago

Hello Sara
I too get this error message
please find below the complete error code
home/hyperion/Arduino/Sample_Picture_send/Sample_Picture_send.ino: In function ‘void smtpCallback(SMTP_Status)’:
Sample_Picture_send:272:27: error: ‘SMTP_Result {aka struct esp_mail_smtp_send_status_t}’ has no member named ‘timesstamp’
localtime_r(&result.timesstamp, &dt); // changed from timesstamp
^
exit status 1
‘SMTP_Result {aka struct esp_mail_smtp_send_status_t}’ has no member named ‘timesstamp’
 
 
I’m definitely using ESP Mail Client 1.3.0  as it is a fresh installation of the IDE 1.8.16
 
 
if I change line 272  timesstamp to be timestamp I get a completely different error message as follows
 
 
/home/hyperion/Arduino/Sample_Picture_send/Sample_Picture_send.ino: In function ‘void smtpCallback(SMTP_Status)’:
Sample_Picture_send:272:41: error: invalid conversion from ‘uint32_t* {aka unsigned int*}’ to ‘const time_t* {aka const long int*}’ [-fpermissive]
localtime_r(&result.timestamp, &dt); // changed from timesstamp
^
In file included from /home/hyperion/.arduino15/packages/esp32/hardware/esp32/1.0.6/tools/sdk/include/newlib/stdio.h:29:0,
from /home/hyperion/.arduino15/packages/esp32/hardware/esp32/1.0.6/cores/esp32/Arduino.h:27,
from sketch/Sample_Picture_send.ino.cpp:1:
/home/hyperion/.arduino15/packages/esp32/hardware/esp32/1.0.6/tools/sdk/include/newlib/time.h:69:12: note: initializing argument 1 of ‘tm* localtime_r(const time_t*, tm*)’
struct tm *_EXFUN(localtime_r, (const time_t *__restrict,
^
exit status 1
invalid conversion from ‘uint32_t* {aka unsigned int*}’ to ‘const time_t* {aka const long int*}’ [-fpermissive]
with the arrow pointing to the &dt e.g. in that it likes &result.timestamp
 
?? do you have any ideas as to what is happening??
I’m using IDE 1.8.16
? which version do you use to develop the code maybe there is another factor creeping in
Kind regards
vin

4 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi.
It seems an issue related to the library version.
Try using version 1.3.3. It’s the version that I’m using at the moment.
Then, tell me if that solves the issue. If not, I will take a deep look at this.
Regards,
Sara

0 Vote Up Vote Down
vincent lawrence answered 4 years ago

hi sara
I’ve upgraded the version of esp mail to 1.3.3 a fairly simple process…
seems to have the same problem
please find below
 
TIMESSTAMP
/home/hyperion/Arduino/Sample_Picture_send/Sample_Picture_send.ino: In function ‘void smtpCallback(SMTP_Status)’:
Sample_Picture_send:272:27: error: ‘SMTP_Result {aka struct esp_mail_smtp_send_status_t}’ has no member named ‘timesstamp’
localtime_r(&result.timesstamp, &dt); // changed from timesstamp
^
exit status 1
‘SMTP_Result {aka struct esp_mail_smtp_send_status_t}’ has no member named ‘timesstamp’
 
again I’ve changed timesstamp to timestamp ( as it looks as if its a typo anyway)
and again I get the same error message as before in that the system likes the structure member of session.timestamp but doesn’t like the type casting of &dt
 sorry its very verbose
 
TIMESSTAMP ->TIMESTAMP
home/hyperion/Arduino/Sample_Picture_send/Sample_Picture_send.ino: In function ‘void smtpCallback(SMTP_Status)’:
Sample_Picture_send:272:41: error: invalid conversion from ‘uint32_t* {aka unsigned int*}’ to ‘const time_t* {aka const long int*}’ [-fpermissive]
localtime_r(&result.timestamp, &dt); // changed from timesstamp
^
In file included from /home/hyperion/.arduino15/packages/esp32/hardware/esp32/1.0.6/tools/sdk/include/newlib/stdio.h:29:0,
from /home/hyperion/.arduino15/packages/esp32/hardware/esp32/1.0.6/cores/esp32/Arduino.h:27,
from sketch/Sample_Picture_send.ino.cpp:1:
/home/hyperion/.arduino15/packages/esp32/hardware/esp32/1.0.6/tools/sdk/include/newlib/time.h:69:12: note: initializing argument 1 of ‘tm* localtime_r(const time_t*, tm*)’
struct tm *_EXFUN(localtime_r, (const time_t *__restrict,
^
exit status 1
invalid conversion from ‘uint32_t* {aka unsigned int*}’ to ‘const time_t* {aka const long int*}’ [-fpermissive]
 
hmmmmmmm
may I ask which version of Arduino IDE you are using because something strange is occurring here I think
KInd regards
vin
 

0 Vote Up Vote Down
vincent lawrence answered 4 years ago

Hi Sara,
Found it.
Somehow the code that I downloaded has a missing line and and inserted line.
localtime_r(&result.timesstamp, &dt); //is what is downloaded with a typo for timestamp hence a previous user reported a similar issue with .timesstamp not being recognised.
this  ( or something similar) is what it should be
time_t ts = (time_t)result.timestamp;
localtime_r(&ts, &dt);
well at least it now compiles, and I can investigate what values are passed through.
Kind regards
vin

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Thanks for sharing that.
I’ll update the code.
I’ll mark this issue as resolved.
If you need further help, you just need to open a new question in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.