Jump to content

Recommended Posts

To create a new gitlab issue, I'd like to send an Email to the following email address using FormBuilder: 

incoming+account/repository@incoming.gitlab.com

unfortunately, the / in the email gets striped by the sanitizer:

wire('sanitizer')->email(incoming+account/repository@incoming.gitlab.com'); 
// output: incoming+accountrepository@incoming.gitlab.com

Is there any way to configure the sanitizer? Any other Ideas how to send the mail to this address?

 

Ps.: I can not define the email format as it is defined by gitlab. The format is also kind of "common" and known as email-alias in the form of emailaccount+alias@domain.com – gmail uses it to label mails…

https://help.wodify.com/hc/en-us/articles/234441508-How-Do-I-Create-an-Email-Alias-

Share this post


Link to post
Share on other sites

Weird. I've never seen a forward slash in an email address.

If I enter the above address in the TO field in Gmail, it's being converted to incoming@incoming.gitlab.com

https://www.jochentopf.com/email/chars.html says it's "maybe" allowed:

Quote

The forward slash is often used in email addresses used by X.400 gateways. Example: 'PN=Joe/OU=X400/@gateway.com'. Because the slash is used as a directory separator in UNIX and other operating systems, it is probably not a good idea to use it in local parts. If you ever want to save the mail in a mailbox named after the local part, you will have problems.

 

Share this post


Link to post
Share on other sites

As I said, I have no control over that part… It works in my email client and is what gitlab provides for inbound issues… The one end I can change is my implementation of PW 😉

Share this post


Link to post
Share on other sites

Sadly, gitlab has known that the forward slash is problematic for quite a while now but the resolutions keeps being pushed from milestone to milestone. There are a lot of mail servers and webmail clients out there that can't deal with these slashes (MS Exchange and Debian's exim default configurations are such examples), so any solution likely involves moving to more common delimiters in the local part of such gitlab addresses, which in turn means that PHP's built-in email sanitizing filter (which $sanitizer->email uses) will then be sufficient.

To speed things up, it might help to upvote the corresponding gitlab issue.

  • Like 1

Share this post


Link to post
Share on other sites

I've just read this quickly. Maybe for now your options are:

  1. Sanitise separately: i..e, do the email itself bit then append your incoming+account/
  2. Use your own regex to sanitise the email (e.g. using $string = $sanitizer->match(string $value, string $regex);  Docs are here)
  3. Sanitise as you are doing then re-insert your / afterwards using string replace or similar.

Like I said, I read this quickly, so, I might be missing the point 🙂.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By cosmicsafari
      Hi all,
      I have the same form on multiple pages, the idea being that I can populated a hidden field with a page specific value automatically.
      I figured this should be reasonably straight forward but I can't seem to get the following to take effect.
      <?php echo $forms->embed ('my-form-name', array('hidden_field_name' => '666')); ?> No matter what I do, it never updates the default value currently set for said hidden field.
      Feels like I'm missing something really obvious?
      Any ideas?
    • By benbyf
      I have a a form in my site footer that can be accessed anywhere on site, I've added the form in the _inc.php file and added the render in the pages footer.php. However, this works well on the homepage e.g. you can submit said form and get a thank you on reload, doesnt work at all on other pages... Just lots like a fresh reload. Any thing im doing wrong here or ways to diagnose as there isn't an error log for formbuilder etc...?
    • By neophron
      Hi,
      I hope, this is the right place for questions about the Formbuilder (I couldn't find in the ProField support a subsection for the Formbuilder).
      A client needs for his website a random generator of a code (as winning numbers). This generator should be placed in a simple form (name and email) and a random generated code should be visible there.
      This code, or winning number, must be stored in the db together with the name and email. And the participant must receive a confirmation email with this code.
      I know, that the Formbuilder can store and send data to the user. But what about a random generated code? Is this a hook job?
      I found this module: http://modules.processwire.com/modules/process-field-generator/ but it's not for PW 3. 
    • By prestoav
      Hi folks.
      I'm building a Formbuilder form to create new advert pages in a marketplace. Formbuilder is ideal for this. I need to add a description field that allows text to be added with line breaks etc. so showing a CKEditor field would be ideal (i.e. exactly like the field I'm typing into right now)!.
      Does anyone know if it's possible to add a CKEditor field to the front end presentation fo a Formbuilder field, maybe via a module or such?
      Many thanks!
    • By ngrmm
      I have a page which sends out an email based on queries in the url
      <?php // event ID $eventID = $input->get('eventID','int'); $event = $pages->get($eventID); // config $adminEmail = "events@test.com"; $fromEmail = "noreply@test.com"; $fromName = "test"; $emailSubject = "Test Email"; // HTML BODY $emailBody = ""; // HOW TO ??? … // send mail $m = new WireMail(); $m->to($adminEmail); $m->from($fromEmail, $fromName); $m->subject($emailSubject); $m->bodyHTML($emailBody); $m->send(); ?> The email body is a bit complex: standard html/css tables and some php (pw variables).
      I put my emailbody (html) in a seperate file emailbody.inc but don't know how to include it?
       
×
×
  • Create New...