•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 374,154 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,449 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:
Views: 493 | Replies: 6
![]() |
i am trying to send out an email which contains images from a database of images that have been uploaded. when i send the email out only the text and any images that have been hard codeing in using the img tag.
i have done some research on this and i have found out that i need to display the images using the absolute path to them but i do not know how to do this.
i found some code to print out the absolute path to where the images is being dstored in the database but how do i then use this path to display the images within the email?
i have done some research on this and i have found out that i need to display the images using the absolute path to them but i do not know how to do this.
i found some code to print out the absolute path to where the images is being dstored in the database but how do i then use this path to display the images within the email?
•
•
Join Date: Sep 2007
Location: North Bay Ontario
Posts: 174
Reputation:
Rep Power: 1
Solved Threads: 20
it is possible to display images in an email i have already got some of them to display on the email that is being sent out but none of the images from the databases will display within the email.
to gat images to display within the email then the absolute paths must be used for the images and they will display. to get an image to display using the absolute path the the code looks some thing like this
i have used this code to get the absolute path of the images bing stored in the database
and this prints out the absolute path to the directory where the mysql table is stored i now need to know how to use this path to get the images to display from the server when the email is sent out.
to gat images to display within the email then the absolute paths must be used for the images and they will display. to get an image to display using the absolute path the the code looks some thing like this
www.yourdomain.com/images/image1.jpg
i have used this code to get the absolute path of the images bing stored in the database
$path = getcwd(); echo "The absolute path to this directory is: "; echo $path;
and this prints out the absolute path to the directory where the mysql table is stored i now need to know how to use this path to get the images to display from the server when the email is sent out.
Last edited by kevin wood : Apr 21st, 2008 at 6:53 am.
•
•
Join Date: Sep 2007
Location: North Bay Ontario
Posts: 174
Reputation:
Rep Power: 1
Solved Threads: 20
•
•
•
•
it is possible to display images in an email i have already got some of them to display on the email that is being sent out but none of the images from the databases will display within the email.
to gat images to display within the email then the absolute paths must be used for the images and they will display. to get an image to display using the absolute path the the code looks some thing like this
www.yourdomain.com/images/image1.jpg
i have used this code to get the absolute path of the images bing stored in the database
$path = getcwd(); echo "The absolute path to this directory is: "; echo $path;
and this prints out the absolute path to the directory where the mysql table is stored i now need to know how to use this path to get the images to display from the server when the email is sent out.
You are correct. In this case the message has to be sent as HTML.
Use
Content-Type: multipart/mixed;
Amer Neely - Web Mechanic
"Others make web sites. We make web sites work!"
"Others make web sites. We make web sites work!"
this is were my problem lies though. i have been able to hard code images in to the html code and send this out as an email newsletter but when the images from the database are used they do not show up on the email.
i have set the page up once with all the images coded in using the img tag and it works i need to be able to recall the images from the database and send them out in the email with the absolute path attached to them so that when the email is opened it knows to look on the server were they are held to retrieve the image and display it correctly in the email.
i have set the page up once with all the images coded in using the img tag and it works i need to be able to recall the images from the database and send them out in the email with the absolute path attached to them so that when the email is opened it knows to look on the server were they are held to retrieve the image and display it correctly in the email.
•
•
Join Date: Sep 2007
Location: North Bay Ontario
Posts: 174
Reputation:
Rep Power: 1
Solved Threads: 20
In order for your images to be available via a web link, they have to be in the 'public' tree of your web server. Think of where you put images to be displayed on a web site. The images you want to send in the email have to be under that same tree.
But this isn't really a MySQL question. It is more of a server / CGI question.
But this isn't really a MySQL question. It is more of a server / CGI question.
Amer Neely - Web Mechanic
"Others make web sites. We make web sites work!"
"Others make web sites. We make web sites work!"
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb MySQL Marketplace
Similar Threads
- Smart URL's (PHP)
- css file (JavaScript / DHTML / AJAX)
- sdl_ttf not working (C++)
- Viewing pictures online (HTML and CSS)
- Trouble with absolute positioning in CSS (HTML and CSS)
- MSVC++ liking issue (C++)
- This Should be Easy for You Guys! (Linux Servers and Apache)
- Relative Paths and Subdomains (PHP)
- Another Program Launching mine (C++)
Other Threads in the MySQL Forum
- Previous Thread: mysql
- Next Thread: Automate Query


Linear Mode