Hi

I've just enabled the module for testing and when sending email I receive the following errors:

Notice: Undefined index: account in SendGridMailSystem->mail() (line 38 of /Applications/MAMP/htdocs/examplesite/sites/all/modules/sendgrid_integration/inc/sendgrid.mail.inc).
Notice: Trying to get property of non-object in SendGridMailSystem->mail() (line 38 of /Applications/MAMP/htdocs/examplesite/sites/all/modules/sendgrid_integration/inc/sendgrid.mail.inc).

I've set my username and API key (password) in the configuration, and SSL is enabled. The email does however seem to be sent (it's logged through SendGrid and I receive it in my inbox). The site is currently running on my local machine (MAMP) for development.

Any help appreciated

Comments

exlin’s picture

Status: Active » Postponed (maintainer needs more info)
StatusFileSize
new31.72 KB

Can you provide me the information about module witch sent the email.
If you haven't altered the the arguments, you will find it under email activity on sendgrid.com
Email Activity

Also what is php version you are using?
Those are php notices and often not dangerous if emails are working, but will get into it.

danmurf’s picture

Thanks for the quick response, exlin. The UID is empty.

uid =
id = contact_page_mail
module = contact

I was sending mail using a custom module I have built for our site, and I also tested it with the core 'contact' module (the same error for both).

I received this error on PHP 5.4.4 and 5.3.3.

Many thanks for your help

exlin’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new760 bytes

Hi,

Could you test this patch if it is working?

danmurf’s picture

The patch seemed to do the trick - the mail was sent + received. Here's the 'email activity' report:

Unique Args:
id = contact_page_mail
module = contact

Any idea why this problem is occurring on my install?

Many thanks for your speedy help with this :)

exlin’s picture

Status: Needs review » Closed (fixed)

My first assumption on arguments provided proved to be wrong. Clearly user_id isn't always provided ;)

danmurf’s picture

Ah - makes sense.

Thanks for your help and for releasing the module anyway - much appreciated :)

entrepreneur2000’s picture

patch #3 worked for me