Emails sent to Customers are never received, However I receive the BCC

Version ie <v5.10.27>

Environment <Shared Hosting/(siteground)>

Checklist

  • Can you replicate the issue on our v5 demo site
    No
  • Have you searched existing issues?
    Yes I have lived on the forums for the last 48 hours and tried all available solutions
  • Have you inspected the logs in storage/logs/laravel.log for any errors?
    Yes, I will detail that below

Describe the bug

I can email customers and receive the email to the main account that states customer was sent quote/invoice but the customer never receives the email only the main user account receives it

Steps To Reproduce

Create a new client or pick existing client
create a quote or invoice
add a line item then save
from there click send email
i receive the email but the customer email address never receives it

Expected Behavior

I expect a customer to receive the email i am sending as well as the bcc to myself

Additional context

I have turned on debugging as well as additional logging per some of the forum posts to get as much detail as i can

Screenshots

Health Check

Cron Jobs
cd /home1/voodoov3/public_html/invoicing && /usr/local/bin/php -d register_argc_argv=On artisan schedule:run >> /dev/null 2>&1

cd /home1/voodoov3/public_html/invoicing && php artisan schedule:run >> /home1/voodoov3/public_html/invoicing/storage/logs/laravel.log 2>&1

Env FIle
APP_NAME=“Invoice Ninja”
APP_ENV=production
APP_KEY=redacted
APP_DEBUG=“true”
EXPANDED_LOGGING=true

APP_URL=“redacted.net
REACT_URL=localhost:3001

DB_CONNECTION=“mysql”
MULTI_DB_ENABLED=false

DB_HOST=“localhost”
DB_DATABASE=“voodoov3_ninja40”
DB_USERNAME=“voodoov3_ninja40”
DB_PASSWORD=“redacted”
DB_PORT=“3306”

DEMO_MODE=false

BROADCAST_DRIVER=log
LOG_CHANNEL=stack
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

POSTMARK_API_TOKEN=
REQUIRE_HTTPS=“true”

GOOGLE_MAPS_API_KEY=
[email protected]
TRUSTED_PROXIES=

NINJA_ENVIRONMENT=“selfhost”

#options - snappdf / phantom / hosted_ninja
PDF_GENERATOR=hosted_ninja

PHANTOMJS_KEY=‘a-demo-key-with-low-quota-per-ip-address’
PHANTOMJS_SECRET=secret

UPDATE_SECRET=redacted

DELETE_PDF_DAYS=60
DELETE_BACKUP_DAYS=60

COMPOSER_AUTH=‘{“github-oauth”: {“github.com”: “${{ secrets.GITHUB_TOKEN }}”}}’

GOOGLE_PLAY_PACKAGE_NAME=
APPSTORE_PASSWORD=

MICROSOFT_CLIENT_ID=
MICROSOFT_CLIENT_SECRET=
MICROSOFT_REDIRECT_URI=

APPLE_CLIENT_ID=
APPLE_CLIENT_SECRET=
APPLE_REDIRECT_URI=

NORDIGEN_SECRET_ID=
NORDIGEN_SECRET_KEY=

OPENEXCHANGE_APP_ID=
MAIL_MAILER=“smtp”
MAIL_PORT=“587”
MAIL_ENCRYPTION=“ssl”
MAIL_HOST=“redacted”
MAIL_USERNAME=“redacted”
MAIL_FROM_NAME=“Steve - Voodoo Visions LLC”
MAIL_FROM_ADDRESS=“redacted”
MAIL_PASSWORD=“redacted”

Logs

Laravel log
INFO No scheduled commands are ready to run.

INFO Skipping [queue-size-job], as command already run on another server.

INFO Skipping [reminder-job], as command already run on another server.

INFO Skipping [quote-reminder-job], as command already run on another server.

INFO Skipping [recurring-invoice-job], as command already run on another server.

INFO Skipping [bank-trans-sync-job], as command already run on another server.

2024-10-21 16:00:04 Running [Callback] … 24.31ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 16:15:03 Running [queue-size-job] … 45.24ms DONE
2024-10-21 16:15:03 Running [Callback] … 40.16ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 16:30:03 Running [queue-size-job] … 70.36ms DONE
2024-10-21 16:30:03 Running [stale-invoice-job] … 109.96ms DONE
2024-10-21 16:30:03 Running [Callback] … 2.14ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 16:45:04 Running [queue-size-job] … 67.00ms DONE
2024-10-21 16:45:04 Running [Callback] … 40.67ms DONE

Content-type: text/html; charset=UTF-8

INFO Skipping [queue-size-job], as command already run on another server.

INFO Skipping [reminder-job], as command already run on another server.

INFO Skipping [quote-reminder-job], as command already run on another server.

INFO Skipping [recurring-invoice-job], as command already run on another server.

2024-10-21 17:00:04 Running [Callback] … 36.56ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 17:15:03 Running [queue-size-job] … 31.27ms DONE
2024-10-21 17:15:03 Running [Callback] … 31.57ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 17:30:04 Running [queue-size-job] … 90.28ms DONE
2024-10-21 17:30:04 Running [stale-invoice-job] … 115.52ms DONE
2024-10-21 17:30:04 Running [Callback] … 2.42ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 17:45:03 Running [queue-size-job] … 49.44ms DONE
2024-10-21 17:45:03 Running [Callback] … 142.64ms DONE

Content-type: text/html; charset=UTF-8

INFO Skipping [queue-size-job], as command already run on another server.

INFO Skipping [reminder-job], as command already run on another server.

INFO Skipping [quote-reminder-job], as command already run on another server.

INFO Skipping [recurring-invoice-job], as command already run on another server.

2024-10-21 18:00:05 Running [Callback] … 52.06ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 18:15:04 Running [queue-size-job] … 49.33ms DONE
2024-10-21 18:15:04 Running [Callback] … 28.33ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 18:30:03 Running [queue-size-job] … 61.20ms DONE
2024-10-21 18:30:03 Running [stale-invoice-job] … 117.88ms DONE
2024-10-21 18:30:03 Running [Callback] … 1.94ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 18:45:03 Running [queue-size-job] … 65.97ms DONE
2024-10-21 18:45:03 Running [Callback] … 33.41ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 19:00:04 Running [queue-size-job] … 51.18ms DONE
2024-10-21 19:00:04 Running [reminder-job] … 92.81ms DONE

INFO Skipping [quote-reminder-job], as command already run on another server.

2024-10-21 19:00:04 Running [recurring-invoice-job] … 20.71ms DONE
2024-10-21 19:00:04 Running [Callback] … 10.46ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 19:15:03 Running [queue-size-job] … 76.49ms DONE
2024-10-21 19:15:03 Running [Callback] … 29.61ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 19:30:03 Running [queue-size-job] … 48.68ms DONE
2024-10-21 19:30:04 Running [stale-invoice-job] … 85.26ms DONE
2024-10-21 19:30:04 Running [Callback] … 4.60ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 19:45:03 Running [queue-size-job] … 28.45ms DONE
2024-10-21 19:45:03 Running [Callback] … 22.34ms DONE

Content-type: text/html; charset=UTF-8

INFO Skipping [queue-size-job], as command already run on another server.

2024-10-21 20:00:04 Running [quote-reminder-job] … 111.52ms DONE

INFO Skipping [recurring-invoice-job], as command already run on another server.

INFO Skipping [bank-trans-sync-job], as command already run on another server.

2024-10-21 20:00:04 Running [Callback] … 3.41ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 20:15:02 Running [queue-size-job] … 35.52ms DONE
2024-10-21 20:15:02 Running [Callback] … 30.08ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 20:30:03 Running [queue-size-job] … 40.35ms DONE
2024-10-21 20:30:03 Running [stale-invoice-job] … 75.05ms DONE
2024-10-21 20:30:03 Running [Callback] … 1.73ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 20:45:03 Running [queue-size-job] … 41.09ms DONE
2024-10-21 20:45:03 Running [Callback] … 28.95ms DONE

Content-type: text/html; charset=UTF-8

INFO Skipping [queue-size-job], as command already run on another server.

INFO Skipping [reminder-job], as command already run on another server.

INFO Skipping [quote-reminder-job], as command already run on another server.

INFO Skipping [recurring-invoice-job], as command already run on another server.

2024-10-21 21:00:04 Running [Callback] … 29.39ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 21:15:03 Running [queue-size-job] … 97.01ms DONE
2024-10-21 21:15:03 Running [Callback] … 36.94ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 21:30:02 Running [queue-size-job] … 28.28ms DONE
2024-10-21 21:30:02 Running [stale-invoice-job] … 216.11ms DONE
2024-10-21 21:30:03 Running [Callback] … 1.23ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 21:45:03 Running [queue-size-job] … 28.98ms DONE
2024-10-21 21:45:03 Running [Callback] … 24.10ms DONE

Content-type: text/html; charset=UTF-8

INFO Skipping [queue-size-job], as command already run on another server.

INFO Skipping [reminder-job], as command already run on another server.

INFO Skipping [quote-reminder-job], as command already run on another server.

INFO Skipping [recurring-invoice-job], as command already run on another server.

2024-10-21 22:00:04 Running [Callback] … 28.56ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 22:15:03 Running [queue-size-job] … 28.81ms DONE
2024-10-21 22:15:03 Running [Callback] … 24.95ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 22:30:03 Running [queue-size-job] … 59.08ms DONE
2024-10-21 22:30:03 Running [stale-invoice-job] … 87.26ms DONE
2024-10-21 22:30:03 Running [Callback] … 1.71ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 22:45:03 Running [queue-size-job] … 35.67ms DONE
2024-10-21 22:45:03 Running [Callback] … 35.36ms DONE

Content-type: text/html; charset=UTF-8

INFO Skipping [queue-size-job], as command already run on another server.

2024-10-21 23:00:05 Running [reminder-job] … 159.02ms DONE

INFO Skipping [quote-reminder-job], as command already run on another server.

2024-10-21 23:00:05 Running [recurring-invoice-job] … 22.72ms DONE
2024-10-21 23:00:05 Running [Callback] … 1.47ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 23:15:03 Running [queue-size-job] … 55.48ms DONE
2024-10-21 23:15:03 Running [Callback] … 30.00ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 23:30:04 Running [queue-size-job] … 95.74ms DONE
2024-10-21 23:30:04 Running [stale-invoice-job] … 101.53ms DONE
2024-10-21 23:30:04 Running [exchange-rate-job] [2024-10-21 23:30:04] production.INFO: updating currencies
… 2.15ms DONE
2024-10-21 23:30:04 Running [Callback] … 2.85ms DONE

Content-type: text/html; charset=UTF-8

2024-10-21 23:45:03 Running [queue-size-job] … 31.79ms DONE
2024-10-21 23:45:03 Running [Callback] … 25.70ms DONE

Content-type: text/html; charset=UTF-8

2024-10-22 00:00:03 Running [App\Jobs\Util\VersionCheck] … 487.80ms DONE

INFO Skipping [queue-size-job], as command already run on another server.

INFO Skipping [reminder-job], as command already run on another server.

INFO Skipping [quote-reminder-job], as command already run on another server.

INFO Skipping [recurring-invoice-job], as command already run on another server.

INFO Skipping [bank-trans-sync-job], as command already run on another server.

2024-10-22 00:00:04 Running [Callback] … 2.09ms DONE

Content-type: text/html; charset=UTF-8

invoiceninja.log
[2024-10-21 20:30:03] production.INFO: Cleaning Stale Invoices:
[2024-10-21 21:00:03] production.INFO: Sending recurring invoices 2024-10-21 09:00:03
[2024-10-21 21:00:03] production.INFO: 2024-10-21 Sending Recurring Invoices. Count = 0
[2024-10-21 21:00:03] production.INFO: Recurring invoice send duration 2024-10-21 09:00:03 - 2024-10-21 09:00:03
[2024-10-21 21:30:02] production.INFO: Cleaning Stale Invoices:
[2024-10-21 21:30:02] production.INFO: pre count = 2 post count = 1
[2024-10-21 22:00:03] production.INFO: Sending recurring invoices 2024-10-21 10:00:03
[2024-10-21 22:00:03] production.INFO: 2024-10-21 Sending Recurring Invoices. Count = 0
[2024-10-21 22:00:03] production.INFO: Recurring invoice send duration 2024-10-21 10:00:03 - 2024-10-21 10:00:03
[2024-10-21 22:30:03] production.INFO: Cleaning Stale Invoices:
[2024-10-21 22:44:29] production.INFO: Using mailer => smtp 2024-10-21 22:44:29
[2024-10-21 23:00:05] production.INFO: Sending recurring invoices 2024-10-21 11:00:05
[2024-10-21 23:00:05] production.INFO: 2024-10-21 Sending Recurring Invoices. Count = 0
[2024-10-21 23:00:05] production.INFO: Recurring invoice send duration 2024-10-21 11:00:05 - 2024-10-21 11:00:05
[2024-10-21 23:20:40] production.INFO: Using mailer => smtp 2024-10-21 23:20:40
[2024-10-21 23:20:41] production.INFO: Trying to send to [email protected] 2024-10-21 23:20:41
[2024-10-21 23:20:41] production.INFO: Using mailer => smtp
[2024-10-21 23:30:04] production.INFO: Cleaning Stale Invoices:
[2024-10-21 23:36:16] production.INFO: Using mailer => smtp 2024-10-21 23:36:16
[2024-10-21 23:36:17] production.INFO: Trying to send to [email protected] 2024-10-21 23:36:17
[2024-10-21 23:36:17] production.INFO: Using mailer => smtp

Hi,

If you’re receiving the BCC clearly the email is being sent, maybe it’s in your client’s spam folder?

I wish it was that easy. I created a test customer and utilized two different emails that i have and i never received the emails. One from gmail and another from a private org.

Do you see the emails in the sent folder?

You may want to use a site like https://www.mail-tester.com to check your emails

Can you let us know the sending domain.
ie what address does the email come from.

Also how have you set up your mailing system? Is the accounts system on the same server as your bccd emails server??

If your spf or dmarc is wrong you might receive your own emails but gmail is very particilar re SPF and dmarc.

Sorry, the emails come from voodoovisions.net. the email address is [email protected]

It runs off the same domain itself. I have spf and dmarc setup. That was something that i realized needed attention as the dmarc was missing from initial setup but is good now.

Asl for the mail tester. i sent a quote to the email it states and i see in the inbox of [email protected] quote was sent to shattered technologies but i do not receive it nor is the mal tester doing anything but counting over and over.

its almost as if it is only sending to itself and not triggering the external customer email.

here is the attached SPF & DKIM Check from the mail-tester.com site

Sorry for the repeat posts. I have ran mail-tester successfully from the inbox and not the software… Idiot moment! here are the results

so it looks like the spf record is screwed up. I followed their guide and updated it. Bluehost seems to not update items as time progresses and they leave it on us to follow the trends. I will give it a few hours to propagate and see if this resolves the issue.

I have since received the updated SPF records and retested. I can send an email from the mailbox directly and receive it in gmail and a corporate inbox. however i am still not receiving them if i send out from IN.

Maybe I posted it wrong, not BCC but the setting that notifies me when a quote / invoice is sent, viewed etc…

Hi Shattered Tech.

I am using MXToolbox.com to pull your records.
Here is what i have :

You receive emails (MX Record: )

mail.voodoovisions.net → 162.241.24.131

You send mails (according to SPF) from :
SPF: v=spf1 a mx include:spf.websitewelcome.com ip4:35.89.44.36 ~all
a: [162.241.24.131]
mx: 162.241.24.131
ip4:35.89.44.36

  • ip4 192.185.0.0/16 Pass Match if IP is in the given range.
  • ip4 50.116.64.0/18 Pass Match if IP is in the given range.
  • ip4 50.87.152.0/21 Pass Match if IP is in the given range.
  • ip4 108.167.128.0/18 Pass Match if IP is in the given range.
  • ip4 216.172.160.0/19 Pass Match if IP is in the given range.
  • ip4 108.179.192.0/18 Pass Match if IP is in the given range.
  • ip4 162.144.0.0/16

SO … your sending server IP of 35.89.44.36 is definitely now in SPF. Awesome start.

your dmarc:
v=DMARC1;p=quarantine;sp=none;adkim=r;aspf=r;pct=100;fo=0;rf=afrf;ri=86400;rua=mailto:[email protected];ruf=mailto:[email protected]

Has relaxed SPF alignment.
Has relaxed DKIM alignment.
Both make delivery easier.
You are asking for mail that does not align to be quarantined.
Possibly make that p=none until you sort this issue.
Your reporting fo=0 maybe change it to fo=1
This will give more reports

Are you receiving DMARC reports? If you are please feel free to send them to [email protected] and notify me ([email protected]) I run a dmarc server - so can parse those reports if that helps.

Two things I cant tell:
The DKIM you use when sending from your mail client maybe different to that used from your IN server. If so you are failing DKIM when sending as IN.
I also notice there is a misalignment between the from and the host name. The sending server calls itself cloudfilter.net and that difference can cause mail misalignment - which then trips gmail / microsoft etc up.

If you want to reach out off this discussion board to [email protected] I would be happy to see if we can resolve this. i am a little shy about putting some details here - as we will be discussing ipaddresses and setups that are best not put in a public forum :slight_smile:

if you want to invoice me at [email protected] then send me a notification you invoiced me - i can grep my server logs ( yes i run my own mail servers - im very old school ) and see headers, connections, ip adddresses etc and see what happens. Even if it bounces i will see those logs.

I’m pretty sure its dkim / dmarc / spf related along with misaligned mail headers.

I personally have used mailgun many times. They help you set up dkim, spf etc which includes their servers and then you can use their authenticated sending servers to send out. Their free teir is very generous. Flexible Email Delivery & API Pricing Plans | Mailgun | Mailgun I use their pay for services (I manage dozens of domains) but for one domain the free tier works

2 Likes

SSL on port 587? Ain’t this a “native” STARTTLS-Port while 465 is the dedicated SSL-/TLS-Port?

I finally gave up trying to understand why mail is not sending via the normal methods. I even changed the email address from [email protected] to [email protected] just to see if it would arrive differently.

its not a real no reply address i just named it that for testing. odd behavior is that even though i completely removed all the settings for payments it was still receiving the notifications to the payments email address.

I took the plunged and quickly created a mailgun account and was able to trigger emails. But now the customer received the email and went and paid their invoice and now i see that in my stripe portal but it shows no-where in IN now. So i have a customer that made a payment i see it processed on stripe but there is nothing and still shows as owed in the system

Are the Stripe webhooks configured?

Yes the webhooks are enabled and worked a few days ago. I can tell you that my host bluehost had an issue and i had to restore a backup that i had taken 24 hours prior to them messing something up. When i restored the backup I noticed that the previous invoice the customer was going to pay was gone. I recreated it and it used the same invoice number but the odd part is that it shows the webhook process on stripe but it never translated over to IN.

My next step today is to add test keys and make sure this is not a one off fluke process that happened because i had to recreate the invoice.

I just created a sandbox in invoice ninja and added a invoice to my test customer. I then used incognito browser so no cookies saved and when I entered the payment this came through without an issue and shows paid and amex transaction. I would chalk this up to having to recover the database and then re-enter the invoice for the customer to pay.

Only reason I can see what happened above is that the customer had tried to pay once already and card was declined because they had not setup up as a vendor yet on the card they were using so stripe seen the first failure against that invoice and in the end even though the invoice numbers matched it sent different transactional data back to stripe so it didnt get reported back correctly.

1 Like