Link to home
Create AccountLog in
Avatar of doctorbill
doctorbillFlag for United Kingdom of Great Britain and Northern Ireland

asked on

php variable

I am trying to set a variable to attach to a phpmailer form

This is the variable:
$imageattach = "images/Cards.jpg";

php mailer variable:
$mail->AddAttachment = $imageattach ;

This does not attach the image

Can I have the correct syntax please
SOLUTION
Avatar of Marco Gasi
Marco Gasi
Flag of Spain image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of doctorbill

ASKER

That does not work - no attachment
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
This now works:
$mail->AddAttachment($imageattach, $imagename) ;
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Thanks all