IMAP Send Email Help

Hi,

I am using the IMAP extension made by @Hyperbytes which is amazing.

I am just trying to make it so the user can use there own details to send a email rather than one I have hardcoded in the mailer. Is this doable?

Problem I am having is I cannot load the users settings to add them to the global mailer or am I missing something. I also can’t load the mailer within the server action it looks like I can only do it on the globals tab

Thanks,

I am on holiday currently in Cambodia, back early April.
Can this wait until then? Dont have npm update credentials with me and a very poor connection.
To summmerise , you want each user to use different sender credentials,presumably drawn from a database table?

Thanks @Hyperbytes.

Yeah that’s it I am trying to pull the details from the database so the user can send emails from there own email account. I have it setup so the users can view their own emails using your extension which works perfect.

I thought with the sending of emails it would be easy part and I could use the Wappler mailer component. However, since this is in the global I cannot make changes (or figure out how to) and it will no longer let you setup a mailer in a single server action.

Enjoy the rest of your holiday :slight_smile:


Brian’s Cambodian Escape

Here he stands in front of the majestic Angkor Wat, backpack slung, smile intact, and not a single meeting invite in sight.

5 Likes

Can I just check is this a bug with Wappler? The standard setup mailer (not in the extension) has no properties when not in a global. Should the properties also be displayed here so I can create a mailer there?

Thanks,

Setup mailer should never be used in server action steps.
It should only be defined in globals under Mailer.

Thanks @Teodor . Guessing I should not be able to select this option from the menu anymore. Is there any Wappler way of dynamically assigning the mailer details from a database query?

Yes if you add a database query in the globals steps then you can use its dynamic data for the mailer.

Thanks if I add it to globals will it run on every server action though?

Yes, that’s correct, but the only way to have some dynamic data in the globals is to get it from the global steps.

Thanks Teodor.

I have added to globals but still can’t see it in the mailer section. Can you notice if I am doing something incorrect?

Is there a reason why I shouldn’t be using the mailer component dynamically in this way ie. security? If not is it technically possible if I make a feature request?

Have you tried the bundled IMAP Send mail component bundled with the extension rather than the Wappler component?
Select "Enable Manual Overrides" and you can add dynamic settings

Will that not do what you need?

Thanks Ben this is what I was trying but I couldn’t get any dynamic variables from the global to show in the mailer.

1 Like

Thanks Brian. Yeah this is exactly what I need :slightly_smiling_face: I did try mess with this but I couldn’t get it to work. I think I confused myself. Will try with this again.

Just checking I need to setup the mailer in globals with dummy values and then I can overwrite the values with this.

In 'Globals' 'Inputs' '$_SESSION' create the variables

And in the dynamic settings, you load the variables.

When you perform an action, you load it with dynamic data retrieved from the database, for example.

1 Like

It's not 'IMAP' but that's how I use it with 'SMTP'.

Each user uses their pre-configured email settings in the system.

Thank you all :slight_smile: I have managed to get it working use global session variables and the wappler default send mail.

@Hyperbytes I could not get the manual override working on the send mail works perfectly on all the IMAP actions I have tried. Probably something I am doing wrong but may be a bug. Really do appreciate you putting in the time to make these extensions :slight_smile:

Just been trying to figure out why I couldn’t get it working and it looks like there may be a typo usesr and should be user.

Well spotted Jamie, will get fixed as soon as i get back

1 Like