Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Matt 359 posts 842 karma points
    Mar 01, 2023 @ 14:51
    Matt
    0

    There was a problem sending a Razor email

    Hi I'm getting an error when trying to send an email with umbraco forms

    There was a problem sending a Razor email to "emailhere" from Workflow for Form "Improvement Request Form" with id "8e3ac6b9-72ff-41cc-871c-f46db387543e" for Record with unique id "fd0b35e9-d4de-43e5-91ee-b7f62cecf401"

    System.IO.IOException: The filename, directory name, or volume label syntax is incorrect. : 'F:\Web\IntranetStage\<optional directory>\c75a327a-d6d1-4f6e-bde3-a3add8de3bfd.eml'
       at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
       at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
       at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
       at Umbraco.Cms.Infrastructure.Mail.EmailSender.SendAsyncInternal(EmailMessage message, String emailType, Boolean enableNotification)
       at Umbraco.Cms.Infrastructure.Mail.EmailSender.SendAsync(EmailMessage message, String emailType)
       at Umbraco.Forms.Core.Services.WorkflowEmailService.SendEmailAsync(SendEmailArgs args)
       at Umbraco.Forms.Core.Providers.WorkflowTypes.SendRazorEmail.Execute(WorkflowExecutionContext context)
    

    Unfortunately the error log doesn't really help me, says its incorrect but what is it looking for?

    Thanks

    Matt

  • James Cordrey 11 posts 113 karma points
    Mar 01, 2023 @ 14:59
    James Cordrey
    0

    If it's actually looking in here:

    F:\Web\IntranetStage\<optional directory>\c75a327a-d6d1-4f6e-bde3-a3add8de3bfd.eml
    

    then the issue would be

    <optional directory> 
    

    having < and > in the name - those are invalid in a file path, and will throw that error.

  • Matt 359 posts 842 karma points
    Mar 01, 2023 @ 15:04
    Matt
    0

    Hi James,

    Thanks for the reply.

    Sorry I should of made myself clear, I'm not actually sure what what optional directory setting is.

    When I'm setting up my SMTP what should the PickUpDirectoryLocation be?

    "PickupDirectoryLocation": "

    Cheers

  • James Cordrey 11 posts 113 karma points
    Mar 01, 2023 @ 15:20
    James Cordrey
    0

    If you were setting a filepath in your config, it would be wherever on your file system you're storing the e-mails, but I don't think you need to set that for Umbraco Forms. (I could be wrong.)

    According to this, you should be storing your e-mail templates here:

    ~/Views/Partials/Forms/Emails/
    

    So you shouldn't need to have PickupDirectoryLocation in your configuration file.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies