Using libquickmail to send mails with a GSM modul

13 Views Asked by At

My goal is to control a BG95-M4 module from Quectel so that I can send email. As a solution for sending the mail, I thought libquickmail is a good approach. I'm currently trying to get it to work with the STM32CubeIDE compiler. There seem to be problems with using the libquickmail libraries, although I should have configured the linker correctly and I have also set up the include path.

int main(void)
{
  /* USER CODE BEGIN 1 */

      quickmail_initialize();
      quickmail mailobj = quickmail_create("here the mail I use to send", "libquick test e-mail");
      quickmail_set_body(mailobj, "mail content");
      quickmail_add_attachment_file(mailobj, "attachment.zip", NULL);
      const char* errmsg;
      if ((errmsg = quickmail_send(mailobj, "here would be the mail server", 25, "here the mail I use to send", "Password")) != NULL)
        fprintf(stderr, "Error sending e-mail: %s\n", errmsg);
      quickmail_destroy(mailobj);
  /* USER CODE END 1 */

While creating this question, other questions came up. Where do I enter the email address I want to send to? and what exactly is entered in “libquick test e-mail”? Can I enter there my destination email address?

This is the error message I get. Unfortunately I couldn't upload the complete error message because the platform interpreted it as spam.

cc1.exe: fatal error: quickmail: No such file or directory
compilation terminated.
cc1.exe: fatal error: quickmail: No such file or directory
compilation terminated.
cc1.exe: fatal error: quickmail: No such file or directory
compilation terminated.
cc1.exe: fatal error: quickmail: No such file or directory
compilation terminated.
make: *** [Drivers/STM32L0xx_HAL_Driver/Src/subdir.mk:58: Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Drivers/STM32L0xx_HAL_Driver/Src/subdir.mk:58: Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_cortex.o] Error 1
make: *** [Drivers/STM32L0xx_HAL_Driver/Src/subdir.mk:58: Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_exti.o] Error 1
make: *** [Drivers/STM32L0xx_HAL_Driver/Src/subdir.mk:58: Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_dma.o] Error 1
"make -j4 all" terminated with exit code 2. Build might be incomplete.

Does anyone have an idea what I could have done wrong?

I tried to integrate the library correctly and expected that it work.

0

There are 0 best solutions below