You cannot make a safe coffee cup using home FDM printers. There are no printable thermoplastics available to consumers/hobbyists that will reliably AND safely contain coffee/tea temperature beverages.
Even though some plastics may appear mechanically suitable at first sight, there are long-term issues with using thermoplastics for elevated temperature service. The material becomes weaker and less dimensionally stable under load as the temperature approaches the glass point of the polymer. For example, here is some Stratasys test data for ABS strength versus temperature:
Even if the plastic survives a few uses, it may creep and warp over time. And that might be fine, depending on your needs! People have printed working coffee cups out of ABS before. For some definition of "working" you can make print a working coffee mug. It's just not going to work at the level of longevity and reliability that people typically expect from hot beverage containers. (Imagine if the handle breaks and pours scalding liquid in your lap.) PLA in particular tends to give out abruptly due to its unusual ability to creep to ultimate failure with very low elongations.
Then there is the question of whether ANY FDM printed part is ever safe for repeated food service use. One-time uses (such as throw-away cookie cutters) might be perfectly fine, but repeated use introduces additional problems because FDM parts are porous. They contain a microscopic void/grain structure that is perfect for trapping food debris and sheltering bacteria. Every FDM part is similar in that regard to an old, scratched, wooden cutting board. They are difficult to effectively sanitize. A high-temp dishwasher cycle will do the job, but that imposes significant thermal stress on thermoplastics.
Here's an example micrograph I took of voids in a printed part (strands all aligned the same way to highlight the shape):
These voids will also allow liquids to leak unless careful print settings are used. Over-extruding with multiple perimeters, or doing some kind of post-print sealing can make water-tight parts. It's not hard, just takes some experimenting.
There is also considerable anecdotal evidence that much of the cheap filament from Asia is full of nasty, toxic substances that may leach into hot beverages. Heavy metals like lead, strontrium, and cadmium are often found in thermoplastics as processing aids, pigments, or simply from unscrupulous companies disposing of industrial ashes by mixing them into dark-colored filaments for export. US-made and EU-made filaments seem to be better in this regard.
Now that the basic issues are out of the way... Here is the breakdown of specific materials you might want to try:
- PLA blends used in 3d printing will soften and fail almost instantly on contact with hot beverages. (They contain melt-reducers and viscosity modifiers and polymer molecular weights specific to FDM filament and will perform differently from injection-molded PLA products.) It is possible to anneal PLA to survive higher temperatures, as this increases the crystallinity of the polymer and thus makes it more heat-stable. However, that is highly experimental and results will vary considerably with filament provider, color/pigment, and annealing process used. Even annealed PLA is unlikely to survive long-term against very hot beverages and dishwasher use.
- ABS will become fairly weak at hot beverage temperatures. It may survive use for a while, but is quite weak and will slowly creep with very hot beverages or in a high-temp dishwasher. ABS IS approved for food use in many contexts, despite what many people think, but hot beverages are not one of the approved uses.
- PET blends are chemically a pretty good choice -- soda bottles are PET -- but generally have glass points around 70-75C and thus will be weak or fail outright at hot beverage temperatures. It is also important to ask what is being blended into the PET. For example, PETG is "glycol modified" but filament vendors do not share any details about this or reveal how it may affect the polymer's leaching behavior.
- Most nylons will creep under load at surprisingly low temperatures, perhaps 50-55C depending on the blend. Nylons are also attacked by acids and will absorb stains and smells from coffee. Nylons also tend to swell/shrink quite dramatically on exposure to water, so mechanical fit and general shape of nylon parts may not be stable enough even for cold beverage service. Taulman's 910 is probably a good candidate for hot beverage service due to its high working temperature, but acid attack from coffee exposure may still be an issue in the long run. It's worth trying.
- Polycarbonate is thermally stable even in boiling water, so mechanically it is fine, but PC leaches BPA (one of the monomers left over from manufacture) into hot liquids.
- High-temp exotics like Ultem and PEEK aren't printable by consumer/hobbyist printers at the size scale required for a coffee mug. They simply warp too much unless you have an oven for a heated build chamber.
In summary, you can make a working coffee mug via FDM printing, but it isn't a great idea. Your best bet for 3d printing a coffee mug is ordering ceramic printed from an online service bureau.